From 1356e2d6b8b2ba449ebf5a1f098b013677dd4920 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Wed, 4 Jan 2023 23:43:54 +0300 Subject: [PATCH] move systemctl command to makefile --- Makefile | 5 ++++- flake.nix | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) 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);