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}" ''
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue