From e626c4c8f1062f10e4be95ecb70c2377856a2993 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 1 Jun 2023 16:50:57 +0200 Subject: [PATCH] deploy-local: Allow not using substituters --- flake.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 55bcf8c..c03bf8f 100644 --- a/flake.nix +++ b/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"