summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
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: {