diff options
Diffstat (limited to 'mut')
| -rwxr-xr-x | mut/bin/pnsh-nvim | 13 | ||||
| -rw-r--r-- | mut/nushell/env.nu | 51 |
2 files changed, 35 insertions, 29 deletions
diff --git a/mut/bin/pnsh-nvim b/mut/bin/pnsh-nvim index 592cdee..07d09c0 100755 --- a/mut/bin/pnsh-nvim +++ b/mut/bin/pnsh-nvim @@ -7,8 +7,10 @@ if not ($desktop_open_pipe | path exists) { let args = ( "--init" + -" --env=TERM=xterm-ghostty" + -$" --env=TERMINFO=($env.TERMINFO)" + +" --entrypoint=/usr/bin/nu" + +" --env=TERM=xterm" + +$" --env=TERMINFO" + +$" --volume=($env.TERMINFO):($env.TERMINFO)" + " --env=_ZO_DATA_DIR=/hostfs/.local/share/zoxide" + " --volume=/etc/profiles/per-user/ivi/etc/profile.d:/etc/profiles/per-user/ivi/etc/profile.d" + " --env=SHELL=/usr/bin/nu" + @@ -22,9 +24,9 @@ $" --hostname=(hostname)" + " --env=HOME" + $" --volume=($env.HOME):($env.HOME)" + $" --workdir=($env | default $env.HOME PWD | get PWD)" + -" --volume=/nix/store:/nix/store" + -" --volume=/nix-config:/nix-config" + -$" --volume=($env.HOME)/.ssh/config:/root/.ssh/config" + +# " --volume=/nix/store:/nix/store" + +$" --volume=/nix-config:/nix-config" + +$" --volume=($env.HOME)/.ssh:/root/.ssh" + $" --volume=($env | default "/var/run" XDG_RUNTIME_DIR | get XDG_RUNTIME_DIR)/docker.sock:/var/run/docker.sock" ) @@ -32,6 +34,7 @@ $" --volume=($env | default "/var/run" XDG_RUNTIME_DIR | get XDG_RUNTIME_DIR)/do ^pnsh --pnsh-host-bindfs-disabled --pnsh-docker-extra-args=$"($args)" + --with-docker --docker-image=pionativedev.azurecr.io/pionative/pnsh-nvim --docker-tag=latest ) diff --git a/mut/nushell/env.nu b/mut/nushell/env.nu index dbb578d..ac0ac47 100644 --- a/mut/nushell/env.nu +++ b/mut/nushell/env.nu @@ -120,28 +120,31 @@ if (not ("/var/run/docker.sock" | path exists)) and (not ((uname | get operating $env.XDG_CACHE_HOME = $"($env.HOME)/.cache" $env.XDG_DATA_HOME = $"($env.HOME)/.local/share" +$env.XDG_CONFIG_HOME = $"($env.HOME)/.config" -do --env { - let ssh_agent_file = ( - $nu.temp-path | path join $"ssh-agent-($env.USER).nuon" - ) - - if ($ssh_agent_file | path exists) { - let ssh_agent_env = open ($ssh_agent_file) - if (ps | where pid == ($ssh_agent_env.SSH_AGENT_PID | into int) | is-not-empty) { - load-env $ssh_agent_env - return - } else { - rm $ssh_agent_file - } - } - - let ssh_agent_env = ^ssh-agent -c - | lines - | first 2 - | parse "setenv {name} {value};" - | transpose --header-row - | into record - load-env $ssh_agent_env - $ssh_agent_env | save --force $ssh_agent_file -} +# if not ("/.dockerenv" | path exists) { +# do --env { +# let ssh_agent_file = ( +# $nu.temp-path | path join $"ssh-agent-($env.USER).nuon" +# ) +# +# if ($ssh_agent_file | path exists) { +# let ssh_agent_env = open ($ssh_agent_file) +# if (ps | where pid == ($ssh_agent_env.SSH_AGENT_PID | into int) | is-not-empty) { +# load-env $ssh_agent_env +# return +# } else { +# rm $ssh_agent_file +# } +# } +# +# let ssh_agent_env = ssh-agent -c +# | lines +# | first 2 +# | parse "setenv {name} {value};" +# | transpose --header-row +# | into record +# load-env $ssh_agent_env +# $ssh_agent_env | save --force $ssh_agent_file +# } +# } |
