2024-11-11 22:37:24 -06:00
|
|
|
# https://stackoverflow.com/a/23324703
|
|
|
|
current_dir:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
|
|
|
|
2024-11-12 23:56:35 -06:00
|
|
|
.PHONY: deploy
|
|
|
|
deploy:
|
2024-11-11 22:37:24 -06:00
|
|
|
rsync -av $(current_dir)/ root@bigbird:config/
|
|
|
|
ssh root@bigbird nixos-rebuild switch --fast -I nixos-config=/root/config/configuration.nix
|
|
|
|
|
|
|
|
## This probably doesn't work, since architectures are different?
|
2024-11-12 23:56:35 -06:00
|
|
|
# .PHONY: local-build-deploy
|
|
|
|
# local-build-deploy:
|
2024-11-11 22:37:24 -06:00
|
|
|
# nixos-rebuild switch --fast -I nixos-config=./configuration.nix --build-host root@animal.chandlerswift.com --target-host root@animal.chandlerswift.com
|
|
|
|
|
2024-11-12 23:56:35 -06:00
|
|
|
.PHONY: deploy-upgrade
|
|
|
|
deploy-upgrade:
|
|
|
|
rsync -avz $(current_dir)/ root@bigbird:config/
|
|
|
|
ssh root@bigbird nixos-rebuild switch --upgrade-all --fast -I nixos-config=/root/config/configuration.nix
|
2024-11-11 22:37:24 -06:00
|
|
|
|
|
|
|
# TODO: build an SD card?
|
|
|
|
#sd-image:
|
|
|
|
# nix-build '<nixpkgs/nixos>'
|