figure out that weird deployment shit

This commit is contained in:
41666 2023-12-22 00:39:48 -05:00
parent c5d34120e9
commit c297f9d1f5
3 changed files with 6 additions and 6 deletions

View file

@ -54,7 +54,6 @@ gc generations="5d":
sudo nix-env --delete-generations {{generations}}
sudo nix-store --gc
sudo nix-collect-garbage -d
nix-collect-garbage
# Add a machine's age key for SOPS
sops-add machine_name target:
@ -66,7 +65,7 @@ sops-generate-keys:
sudo cat /etc/ssh/ssh_host_ed25519_key | ssh-to-age --private-key > .sops.keys
cat ~/.ssh/id_ed25519 | ssh-to-age --private-key >> .sops.keys
deploy target_host target_override="":
TARGET=
if [ "{{target_override}}" == "" ]; then TARGET=$(cat nixos/hosts/{{target_host}}/.target); else TARGET="{{target_override}}"; fi
@echo "TARGET=$TARGET"
deploy target_host branch="main":
test -f nixos/hosts/{{target_host}}/.target || { echo "Host cannot be deployed, add a .target file with SSH destination"; exit 69; }
ssh -A `cat nixos/hosts/{{target_host}}/.target` sudo nixos-rebuild switch --flake \'git+https://codeberg.org/noe/nixos.git?ref={{branch}}#{{target_host}}\'

View file

@ -0,0 +1 @@
192.168.1.229

View file

@ -4,7 +4,7 @@
./hardware-configuration.nix
../../server.nix
../../features/systemd-boot.nix
#../../features/podman.nix
../../features/podman.nix
];
networking.hostName = "blueberry";