bigbird: Add initial nas configuration

This commit is contained in:
Chandler Swift 2024-11-11 22:37:24 -06:00
parent a367be6426
commit a89a4b9b4a
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
5 changed files with 175 additions and 0 deletions

21
bigbird/Makefile Normal file
View file

@ -0,0 +1,21 @@
# https://stackoverflow.com/a/23324703
current_dir:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
.PHONY: remote-deploy
remote-deploy:
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?
# .PHONY: deploy
# deploy:
# nixos-rebuild switch --fast -I nixos-config=./configuration.nix --build-host root@animal.chandlerswift.com --target-host root@animal.chandlerswift.com
.PHONY: remote-deploy-upgrade
remote-deploy-upgrade:
rsync -avz $(current_dir)/ root@animal.chandlerswift.com:config/
ssh root@animal.chandlerswift.com nixos-rebuild switch --upgrade-all --fast -I nixos-config=/root/config/configuration.nix
# TODO: build an SD card?
#sd-image:
# nix-build '<nixpkgs/nixos>'