commit 575242fb2c0908399879fbe5b782650b9ef21fa2
parent 7bd5b168154ca7b9311336e61ee15f59cf500f98
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 31 Jul 2022 17:15:38 +0200
parent 7bd5b168154ca7b9311336e61ee15f59cf500f98
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 31 Jul 2022 17:15:38 +0200
nixos-deploy: hardcode system to `x86_64-linux`
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/nixos-deploy b/nixos-deploy @@ -1,9 +1,6 @@ #!/usr/bin/env bash set -eo pipefail -#tmp=$(mktemp -d) -#trap 'rm -rf "$tmp"' EXIT - cd "$(dirname "$0")" machine="${1:-lollo}" @@ -20,14 +17,12 @@ fi echo "deploying $machine to $target" sleep 1 -#cp --no-preserve=mode -r $(nix-build nix/sources-dir.nix --no-out-link) $tmp/sources - set -x system_drv=$( - nix-instantiate "<nixpkgs/nixos>" -A config.system.build.toplevel \ + nix-instantiate --system x86_64-linux --builders 'ssh://osterei.ctu.cx x86_64-linux' "<nixpkgs/nixos>" -A config.system.build.toplevel \ -I "$(nix-build nix/sources-dir.nix --no-out-link)" \ -I "nixos-config=machines/$machine/configuration.nix" ) -nix-copy-closure --to $target $system_drv +nix-copy-closure --use-substitutes --to $target $system_drv system=$(ssh $target "nix-store --realise $system_drv") ssh $target "sudo nix-env -p /nix/var/nix/profiles/system -i $system && sudo /nix/var/nix/profiles/system/bin/switch-to-configuration $mode"