IP ?= HOST ?= deploy: # push flake config to a remote server ifeq ($(IP),) $(error IP not set) endif ifeq ($(HOST),) $(error HOST not set) endif ifneq ($(shell git diff),) git add . git commit -m "auto commit on build" -m "`PAGER=cat git diff --name-only --cached`" endif rsync -azr ./ crown@$(IP):~/flake-config ssh crown@$(IP) "NIX_CONFIG='experimental-features = flakes pipe-operators' sudo nixos-rebuild switch --flake ~/flake-config#$(HOST)" sops: # update sops keys sops updatekeys secrets.yaml .DEFAULT_GOAL := default .PHONY: default deploy sops default: # noop