jsut deploy with flags

This commit is contained in:
41666 2023-12-22 20:13:54 -05:00
parent dd612cdc7b
commit 45dbc90414

View file

@ -66,9 +66,9 @@ sops-generate-keys:
sudo cat /etc/ssh/ssh_host_ed25519_key | ssh-to-age --private-key > .sops.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 cat ~/.ssh/id_ed25519 | ssh-to-age --private-key >> .sops.keys
deploy target_host: deploy target_host extra_flags="":
@test -f nixos/hosts/{{target_host}}/.target || { echo "Host cannot be deployed, add a .target file with SSH destination"; exit 1; } @test -f nixos/hosts/{{target_host}}/.target || { echo "Host cannot be deployed, add a .target file with SSH destination"; exit 1; }
ssh -A `cat nixos/hosts/{{target_host}}/.target` sudo nixos-rebuild switch --flake \"git+https://codeberg.org/noe/nixos.git?ref={{branch}}\&rev={{commit}}#{{target_host}}\" ssh -A `cat nixos/hosts/{{target_host}}/.target` sudo nixos-rebuild switch {{extra_flags}} --flake \"git+https://codeberg.org/noe/nixos.git?ref={{branch}}\&rev={{commit}}#{{target_host}}\"
# #
ssh target_host *args='': ssh target_host *args='':