Skip to content

Commit 961130d

Browse files
committed
build: fix remote install targets with home
1 parent 9f67ad6 commit 961130d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.make/50-home.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ ifneq (${HOSTNAME},${WORK_HOSTNAME})
1212
define homeTarget
1313
$(eval
1414
#: Builds the target home's activation script.
15-
home/$(1)@$(2): .roots/home/$(1)@$(2);
15+
home/$(1)@$(2): .roots/home/$(1)@$(2)
1616
)
1717
endef
1818

1919
define homeHostTarget
2020
$(eval
2121
#: Builds the target host's activation script.
22-
host/$(2): home/$(1)@$(2);
22+
host/$(2): home/$(1)@$(2)
2323
)
2424
endef
2525

2626
define installHomeTarget
2727
$(eval
2828
#: Activates configuration over SSH.
2929
install/$(2):: home/$(1)@$(2)
30-
install/$(2):: DRV=$$(shell readlink -f .roots/home/$(1)@$(2))
3130
install/$(2)::
32-
nix-copy-closure --to $(1)@$(2) $${DRV}
33-
ssh root@nas 'nix-env --profile /nix/var/nix/profiles/per-user/$(1)/home-manager --set "$${DRV}" && "$${DRV}/activate" --driver-version 1'
31+
export DRV=$$(shell readlink -f .roots/home/$(1)@$(2)); \
32+
nix-copy-closure --to $(1)@$(2) $$$${DRV}; \
33+
ssh $(1)@$(2) 'nix-env --profile /nix/var/nix/profiles/per-user/$(1)/home-manager --set '$$$${DRV}' && '$$$${DRV}/activate" --driver-version 1"
3434
)
3535
endef
3636

0 commit comments

Comments
 (0)