deploy-local: Allow not using substituters

Simon Bruder 2023-06-01 16:50:57 +02:00
parent 88f97c27de
commit e626c4c8f1
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 10 additions and 1 deletions

View File

@ -110,9 +110,18 @@
(hostname: machine: pkgs.writeShellScript "deploy-local-${hostname}" ''
set -euo pipefail
SUBSTITUTE="-s"
for i in "$@"; do
case $i in
-S)
SUBSTITUTE=""
;;
esac
done
closure="$(nix build -L --print-out-paths .#nixosConfigurations.${hostname}.config.system.build.toplevel)"
nix copy \
-s \
$SUBSTITUTE \
-L \
--to ssh://root@${machine.config.deployment.targetHost} \
"$closure"