diff --git a/Makefile b/Makefile index b07e68e..b4f9c0a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/flake.nix b/flake.nix index 2be065d..17443e2 100644 --- a/flake.nix +++ b/flake.nix @@ -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);