2024-10-01 10:02:01 +02:00
|
|
|
{ writeShellApplication }:
|
|
|
|
name: config:
|
|
|
|
writeShellApplication {
|
|
|
|
name = "deploy";
|
|
|
|
text = ''
|
|
|
|
result="$(nix build --print-out-paths ${./.}#nixosConfigurations#${name} --eval-store auto --store ssh-ng://${name})"
|
|
|
|
# shellcheck disable=SC2087
|
|
|
|
ssh ${name} << EOF
|
|
|
|
nix-env -p /nix/var/nix/profiles/system --set "$result"
|
|
|
|
"$result"/bin/switch-to-configuration switch
|
|
|
|
EOF
|
|
|
|
'';
|
2024-11-11 17:25:42 +01:00
|
|
|
}
|