17 lines
621 B
Makefile
17 lines
621 B
Makefile
|
# 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
|