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}}\'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue