deploy-local: Allow not using substituters

This commit is contained in:
Simon Bruder 2023-06-01 16:50:57 +02:00
parent 89855c41cc
commit fdde11774b
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -110,9 +110,18 @@
(hostname: machine: pkgs.writeShellScript "deploy-local-${hostname}" '' (hostname: machine: pkgs.writeShellScript "deploy-local-${hostname}" ''
set -euo pipefail 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)" closure="$(nix build -L --print-out-paths .#nixosConfigurations.${hostname}.config.system.build.toplevel)"
nix copy \ nix copy \
-s \ $SUBSTITUTE \
-L \ -L \
--to ssh://root@${machine.config.deployment.targetHost} \ --to ssh://root@${machine.config.deployment.targetHost} \
"$closure" "$closure"