deploy-local: Allow not using substituters
This commit is contained in:
parent
89855c41cc
commit
fdde11774b
11
flake.nix
11
flake.nix
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue