From 4926bfba4e057c0a5dddd6faad52c9a58e318a49 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 7 Mar 2022 22:00:10 -0500 Subject: [PATCH] Added make targets to make easier to run. Specifically setup to work with Emac's task runner tooling. --- makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 makefile diff --git a/makefile b/makefile new file mode 100644 index 0000000..979aac7 --- /dev/null +++ b/makefile @@ -0,0 +1,17 @@ +# -*- mode: makefile-gmake; -*- +ifeq ($(shell $(MAKE) -v | grep GNU),) + $(error I need gnumake not bsdmake) +endif +REQUIRED_V := 3.82 +ifneq ($(REQUIRED_V),$(firstword $(sort $(MAKE_VERSION) $(REQUIRED_V)))) + $(error For .ONESHELL to work I need at least version $(REQUIRED_V)) +endif + +.ONESHELL: + +switch: + sudo nixos-rebuild switch --flake . + +upgrade: + sudo nix-channel --update + nix flake update