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
1 changed files with 3 additions and 7 deletions

View File

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