diff --git a/Makefile b/Makefile index 66e78ed..8e80276 100644 --- a/Makefile +++ b/Makefile @@ -37,13 +37,21 @@ $(1): ; systemctl --user reset-failed $$(NIX_RUN)switch/$(1) -.PHONY: $(1)-test -$(1)-test: ; $$(NIX_RUN)test/$(1) +.PHONY: rollback-$(1) +rollback-$(1): + $$(NIX_RUN)rollback/$(1) + +.PHONY: test-$(1) +test-$(1): ; $$(NIX_RUN)test/$(1) endef define vps_rule .PHONY: $(1) $(1): ; $$(NIX_RUN)deploy/$(1) + +.PHONY: rollback-$(1) +rollback-$(1): + $$(NIX_RUN)rollback/$(1) endef $(foreach machine,$(MACHINES),$(eval $(call machine_rule,$(machine)))) diff --git a/flake.nix b/flake.nix index 8e5750f..008ce44 100644 --- a/flake.nix +++ b/flake.nix @@ -74,9 +74,7 @@ rollback = lib.recurseIntoAttrs (lib.mapAttrs (hostname: machine: pkgs.writeShellScript "rollback-${hostname}" '' - ${nixos-rebuild}/bin/nixos-rebuild test \ - --rollback \ - --flake .#${hostname} + ${nixos-rebuild}/bin/nixos-rebuild switch --rollback '') self.nixosConfigurations);