summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@localhost>2025-01-21 08:43:49 +0000
committerMike Vink <59492084+ivi-vink@users.noreply.github.com>2025-01-21 14:03:00 +0100
commitde6aa72099a2b8618562c2ab4230a2c2044655d2 (patch)
tree1c082d8f4ba84e3eed492315775a26ca2adf34df
parent6777625ee34666986e2f38f5cf8198fdb360ea55 (diff)
do symlinks outside of nix
-rw-r--r--justfile7
-rw-r--r--machines/work.nix7
-rwxr-xr-xmut/bin/pnsh-nvim13
-rw-r--r--mut/nushell/env.nu51
-rw-r--r--profiles/core/home.nix5
-rw-r--r--profiles/core/neovim.nix1
6 files changed, 49 insertions, 35 deletions
diff --git a/justfile b/justfile
index 9b40b62..ca3b5b8 100644
--- a/justfile
+++ b/justfile
@@ -63,3 +63,10 @@ NIXNAME := "vm-aarch64"
ssh {{SSH_OPTIONS}} -p22 root@{{ip}} " \
sudo reboot; \
"
+
+@symlinks:
+ ln -sf /nix-config/mut/DefaultKeyBinding.dict ~/Library/KeyBindings/DefaultKeyBinding.dict
+ ln -sf /nix-config/mut/aerospace ~/.config/aerospace
+ ln -sf /nix-config/mut/ghostty ~/.config/ghostty
+ ln -sf /nix-config/mut/nushell ~/.config/nushell
+ ln -sf /nix-config/mut/neovim ~/.config/nvim
diff --git a/machines/work.nix b/machines/work.nix
index 1cc47c7..aa720bf 100644
--- a/machines/work.nix
+++ b/machines/work.nix
@@ -40,15 +40,16 @@
pkgs.nushell
pkgs.zsh
pkgs.bashInteractive
- pkgs.openssh
+ pkgs.just
];
hm = {
+ # services.ssh-agent.enable = true;
home = {
sessionPath = [
"/opt/homebrew/bin"
];
- file.".config/aerospace".source = config.lib.meta.mkMutableSymlink /mut/aerospace;
- file."Library/KeyBindings/DefaultKeyBinding.dict".source = config.lib.meta.mkMutableSymlink /mut/DefaultKeyBinding.dict;
+ # file.".config/aerospace".source = config.lib.meta.mkMutableSymlink /mut/aerospace;
+ # file."Library/KeyBindings/DefaultKeyBinding.dict".source = config.lib.meta.mkMutableSymlink /mut/DefaultKeyBinding.dict;
file."gpg-agent.conf" = {
text = ''
pinentry-program /opt/homebrew/bin/pinentry-mac
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
+# }
+# }
diff --git a/profiles/core/home.nix b/profiles/core/home.nix
index c47a95d..cc34a65 100644
--- a/profiles/core/home.nix
+++ b/profiles/core/home.nix
@@ -14,8 +14,9 @@ with lib; {
PASSWORD_STORE_DIR = config.synced.password-store.path;
};
};
- home.file.".config/ghostty".source = config.lib.meta.mkMutableSymlink /mut/ghostty;
- home.file.".config/nushell".source = config.lib.meta.mkMutableSymlink /mut/nushell;
+ # home.file.".config/ghostty".source = config.lib.meta.mkMutableSymlink /mut/ghostty;
+ # home.file.".config/nushell".source = config.lib.meta.mkMutableSymlink /mut/nushell;
+ # xdg.configFile."nvim".source = config.lib.meta.mkMutableSymlink /mut/neovim;
xdg = {
enable = true;
mime.enable = !machine.isDarwin;
diff --git a/profiles/core/neovim.nix b/profiles/core/neovim.nix
index dc3bc6e..8ec65a0 100644
--- a/profiles/core/neovim.nix
+++ b/profiles/core/neovim.nix
@@ -4,7 +4,6 @@
...
}: {
hm = {
- xdg.configFile."nvim".source = config.lib.meta.mkMutableSymlink /mut/neovim;
editorconfig = {
enable = true;
settings = {