From e8f2ad8304310f7ddbd79da3a649d4b16e067478 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 17 Feb 2019 14:16:21 -0800 Subject: Create makefile More flexible than a script --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7b938e8 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +HOST = root@simatime.com +OUT = $(shell readlink -n ./result) + +result: + nix-build --attr system ./nixos.nix + +copy: result + nix copy --to "ssh://$(USER)@$(HOST)" ./result + +switch: + ssh $(USER)@$(HOST) sudo "$(OUT)/bin/switch-to-configuration" switch + +clean: FORCE + rm -f ./result + +.PHONY: FORCE -- cgit v1.2.3