forked from Fediversity/Fediversity
Valentin Gagarin
c6cc92f5dc
git-subtree-dir: services git-subtree-mainline:e41e0daa82
git-subtree-split:a13b1e9372
14 lines
399 B
Nix
14 lines
399 B
Nix
{ 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
|
|
'';
|
|
}
|