machine-config/bert/Makefile

17 lines
621 B
Makefile
Raw Normal View History

2024-10-31 00:55:10 -05:00
# https://stackoverflow.com/a/23324703
current_dir:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
.PHONY: deploy
deploy:
rsync -avz $(current_dir)/ root@bert:config/
ssh root@bert nixos-rebuild switch --fast -I nixos-config=/root/config/configuration.nix
.PHONY: local-build-deploy
local-build-deploy:
nixos-rebuild switch --fast -I nixos-config=./configuration.nix --build-host root@bert --target-host root@bert
.PHONY: deploy-upgrade
deploy-upgrade:
rsync -avz $(current_dir)/ root@bert:config/
ssh root@bert nixos-rebuild switch --upgrade-all --fast -I nixos-config=/root/config/configuration.nix