Use writeShellScript

This commit is contained in:
Sandro - 2022-12-22 21:56:25 +01:00
parent 24bc378143
commit 6b692d6e7b
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -165,16 +165,12 @@ in
c3d2.simd.arch = arch-to-host.${config.c3d2.deployment.server}; c3d2.simd.arch = arch-to-host.${config.c3d2.deployment.server};
system.build = with pkgs; { system.build = {
copyToServer = writeScript "copy-to-${server}" '' copyToServer = pkgs.writeShellScript "copy-to-${server}" ''
#! ${runtimeShell} -e
nix copy --no-check-sigs --to ssh-ng://root@${serverFQDN} $@ nix copy --no-check-sigs --to ssh-ng://root@${serverFQDN} $@
''; '';
runOnServer = writeScript "run-on-${server}" '' runOnServer = pkgs.writeShellScript "run-on-${server}" ''
#! ${runtimeShell} -e
ssh root@${serverFQDN} -- $@ ssh root@${serverFQDN} -- $@
''; '';
}; };