Fix remote building

This commit is contained in:
Charlotte Van Petegem 2021-04-15 02:36:06 +02:00
parent 003672d9ed
commit 2144790975
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -2,5 +2,7 @@
set -euo pipefail set -euo pipefail
set -x set -x
nix build --no-link --profile /nix/var/nix/profiles/per-user/charlotte/$1 .#nixosConfigurations.$1.config.system.build.toplevel drv=$(nix eval .#nixosConfigurations.$1.config.system.build.toplevel.drvPath | tr -d '"')
nixos-rebuild --flake .#$1 --target-host root@$1 --build-host localhost $2 nix copy --derivation -s --to "ssh://root@$1" "$drv"
ssh root@$1 nix build -L --no-link "$drv"
nixos-rebuild --flake .#$1 --target-host root@$1 $2