autotrim := on
reservation := 1G
compression := zstd
-target := nixos@192.168.3.101
-TARGET := root@192.168.3.101
+TARGET ?= root@192.168.3.101
machine-id.clear:
touch -a $@
mount -v -o zfsutil,X-mount.mkdir -t zfs $(zpool)/root/var $(targetRoot)/var; \
findmnt \
"'
- nix copy --to "ssh://$(TARGET)?$(targetStore)" ../courge.root
+ nix copy --to "ssh://$(TARGET)?$(targetStore)" ../$(hostName).root
gpg -d credential.secret.gpg | \
ssh $(TARGET) sh -xec '" \
nix-env --store $(targetRoot) -p $(targetRoot)/nix/var/nix/profiles/system \
set -eux; \
mount --rbind --mkdir / $(targetRoot); \
mount --make-rslave $(targetRoot); \
- NIXOS_INSTALL_BOOTLOADER=1 $(shell realpath -e ../courge.root)/bin/switch-to-configuration boot; \
+ NIXOS_INSTALL_BOOTLOADER=1 '$$(realpath -e ../$(hostName).root)'/bin/switch-to-configuration boot; \
umount -R $(targetRoot) && rmdir $(targetRoot) \
"'