Show what is happening
This commit is contained in:
parent
086a86eb61
commit
ff6a759f18
|
@ -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) //
|
||||||
|
|
Loading…
Reference in New Issue