move systemctl command to makefile

This commit is contained in:
Dmitriy Pleshevskiy 2023-01-04 23:43:54 +03:00
parent d82554806b
commit 1356e2d6b8
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 4 additions and 2 deletions

View file

@ -29,7 +29,10 @@ help:
cat Makefile
define machine_rule
$(1): ; $$(NIX_RUN)switch/$(1)
$(1): ;
systemctl --user reset-failed
$$(NIX_RUN)switch/$(1)
$(1)-test: ; $$(NIX_RUN)test/$(1)
endef

View file

@ -91,7 +91,6 @@
switch = lib.recurseIntoAttrs (lib.mapAttrs
(hostname: machine: pkgs.writeShellScript "switch-${hostname}" ''
${pkgs.systemd}/bin/systemctl --user reset-failed
${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@
'')
localMachines);