aubergine: wifi: unhide SSID
[julm/julm-nix.git] / hosts / courge / Makefile
index d32943382838c11bc81c4f3afa8137d61f67076f..1febb1da62c53edb525dba65af456ccc43c2e233 100644 (file)
@@ -6,8 +6,7 @@ cipher      := aes-128-gcm
 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 $@
@@ -109,7 +108,7 @@ install:
          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 \
@@ -122,6 +121,6 @@ install:
          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) \
        "'