flake-config/Makefile
2025-11-09 23:59:20 -05:00

23 lines
490 B
Makefile

IP ?=
HOST ?=
deploy:
# push flake config to a remote server
ifeq ($(IP),)
$(error IP not set)
endif
ifeq ($(HOST),)
$(error HOST not set)
endif
git add .
git commit -m "auto commit on build" -m "`PAGER=cat git diff --name-only --cached`"
rsync -azr ./ crown@$(IP):~/flake-config
ssh crown@$(IP) "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