figure out that weird deployment shit
This commit is contained in:
parent
c5d34120e9
commit
c297f9d1f5
3 changed files with 6 additions and 6 deletions
9
Justfile
9
Justfile
|
@ -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}}\'
|
||||
|
||||
|
|
1
nixos/hosts/blueberry/.target
Normal file
1
nixos/hosts/blueberry/.target
Normal file
|
@ -0,0 +1 @@
|
|||
192.168.1.229
|
|
@ -4,7 +4,7 @@
|
|||
./hardware-configuration.nix
|
||||
../../server.nix
|
||||
../../features/systemd-boot.nix
|
||||
#../../features/podman.nix
|
||||
../../features/podman.nix
|
||||
];
|
||||
|
||||
networking.hostName = "blueberry";
|
||||
|
|
Loading…
Add table
Reference in a new issue