Show what is happening

This commit is contained in:
Sandro - 2021-10-31 12:49:09 +01:00
parent 086a86eb61
commit ff6a759f18
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 3 additions and 3 deletions

View File

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