move systemctl command to makefile
This commit is contained in:
parent
d82554806b
commit
1356e2d6b8
2 changed files with 4 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -29,7 +29,10 @@ help:
|
||||||
cat Makefile
|
cat Makefile
|
||||||
|
|
||||||
define machine_rule
|
define machine_rule
|
||||||
$(1): ; $$(NIX_RUN)switch/$(1)
|
$(1): ;
|
||||||
|
systemctl --user reset-failed
|
||||||
|
$$(NIX_RUN)switch/$(1)
|
||||||
|
|
||||||
$(1)-test: ; $$(NIX_RUN)test/$(1)
|
$(1)-test: ; $$(NIX_RUN)test/$(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,6 @@
|
||||||
|
|
||||||
switch = lib.recurseIntoAttrs (lib.mapAttrs
|
switch = lib.recurseIntoAttrs (lib.mapAttrs
|
||||||
(hostname: machine: pkgs.writeShellScript "switch-${hostname}" ''
|
(hostname: machine: pkgs.writeShellScript "switch-${hostname}" ''
|
||||||
${pkgs.systemd}/bin/systemctl --user reset-failed
|
|
||||||
${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@
|
${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@
|
||||||
'')
|
'')
|
||||||
localMachines);
|
localMachines);
|
||||||
|
|
Loading…
Reference in a new issue