diff --git a/flake.nix b/flake.nix index 9e6b81cf..3387e351 100644 --- a/flake.nix +++ b/flake.nix @@ -136,7 +136,7 @@ # remote machine and bulding and switching there. # Can be run with `nix run c3d2#…-nixos-rebuild switch` "${name}-nixos-rebuild" = pkgs.writeScriptBin "${name}-nixos-rebuild" '' - #!${pkgs.runtimeShell} -e + #!${pkgs.runtimeShell} -ex [[ $(ssh ${target} cat /etc/hostname) == ${name} ]] nix copy --to ssh://${target} ${secrets} nix copy --to ssh://${target} ${self} @@ -144,14 +144,14 @@ ''; "${name}-nixos-rebuild-local" = pkgs.writeScriptBin "${name}-nixos-rebuild" '' - #!${pkgs.runtimeShell} -e + #!${pkgs.runtimeShell} -ex [[ $(ssh ${target} cat /etc/hostname) == ${name} ]] nix copy --to ssh://${target} ${profile} ssh ${target} "${profile}/bin/switch-to-configuration $*" ''; "${name}-cleanup" = pkgs.writeScriptBin "${name}-cleanup" '' - #!${pkgs.runtimeShell} -e + #!${pkgs.runtimeShell} -ex ssh ${target} "time nix-collect-garbage -d && time nix-store --optimise" ''; }) {} (builtins.attrNames flakifiedHosts) //