summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2025-10-26 11:10:16 +0100
committerMathias Magnusson <mathias@magnusson.space>2025-10-26 11:10:16 +0100
commit5fc9c83c37308d1865d9e89f7550b479dcb0cb7e (patch)
tree298d627e84be3a5bcba411de775cf64bfd5a4ebf /flake.nix
parent5a3dcbe207323690143fff0f1ebeb4a28f2acfc6 (diff)
downloadoden-5fc9c83c37308d1865d9e89f7550b479dcb0cb7e.tar.gz
allow deploy script to performactions other than switch
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index d9c3509..a56ed31 100644
--- a/flake.nix
+++ b/flake.nix
@@ -55,7 +55,8 @@
};
packages = forAllSystems (pkgs: {
deploy = pkgs.writeShellScriptBin "deploy" ''
- nixos-rebuild --flake .#oden switch --target-host oden --build-host oden --use-remote-sudo
+ [ -n "$1" ] && action="$1" || action="switch"
+ nixos-rebuild --flake .#oden "$action" --target-host oden --build-host oden --use-remote-sudo
'';
});
devShells = forAllSystems (pkgs: {