From b5bde417188fd0869fc4153e3459e408210ac0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Mon, 21 Jul 2025 22:30:28 +0200 Subject: [PATCH] fix: make n[switch,boot,dry] work anywhere --- SwarselSystems.org | 5 +++-- modules/home/common/zsh.nix | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index eefc1a4..bb55bde 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -11515,9 +11515,10 @@ Currently I only use it as before with =initExtra= though. hg = "history | grep"; hmswitch = "home-manager --flake ${flakePath}#$(whoami)@$(hostname) switch |& nom"; # nswitch = "sudo nixos-rebuild --flake ${flakePath}#$(hostname) --show-trace --log-format internal-json -v switch |& nom --json"; - nswitch = "swarsel-deploy $(hostname) switch"; + nswitch = "cd ${flakePath}; swarsel-deploy $(hostname) switch; cd -;"; + nboot = "cd ${flakePath}; swarsel-deploy $(hostname) boot; cd -;"; + ndry = "cd ${flakePath}; swarsel-deploy $(hostname) dry-activate; cd -;"; # nboot = "sudo nixos-rebuild --flake ${flakePath}#$(hostname) --show-trace --log-format internal-json -v boot |& nom --json"; - nboot = "swarsel-deploy $(hostname) boot"; magit = "emacsclient -nc -e \"(magit-status)\""; config = "git --git-dir=$HOME/.cfg/ --work-tree=$HOME"; g = "git"; diff --git a/modules/home/common/zsh.nix b/modules/home/common/zsh.nix index def981f..30f929f 100644 --- a/modules/home/common/zsh.nix +++ b/modules/home/common/zsh.nix @@ -26,9 +26,10 @@ in hg = "history | grep"; hmswitch = "home-manager --flake ${flakePath}#$(whoami)@$(hostname) switch |& nom"; # nswitch = "sudo nixos-rebuild --flake ${flakePath}#$(hostname) --show-trace --log-format internal-json -v switch |& nom --json"; - nswitch = "swarsel-deploy $(hostname) switch"; + nswitch = "cd ${flakePath}; swarsel-deploy $(hostname) switch; cd -;"; + nboot = "cd ${flakePath}; swarsel-deploy $(hostname) boot; cd -;"; + ndry = "cd ${flakePath}; swarsel-deploy $(hostname) dry-activate; cd -;"; # nboot = "sudo nixos-rebuild --flake ${flakePath}#$(hostname) --show-trace --log-format internal-json -v boot |& nom --json"; - nboot = "swarsel-deploy $(hostname) boot"; magit = "emacsclient -nc -e \"(magit-status)\""; config = "git --git-dir=$HOME/.cfg/ --work-tree=$HOME"; g = "git";