justfile: add deploy2
This commit is contained in:
parent
9277d55791
commit
4af658a0ae
1 changed files with 4 additions and 0 deletions
4
Justfile
4
Justfile
|
@ -75,6 +75,10 @@ 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; }
|
||||
ssh -A `cat nixos/hosts/{{target_host}}/.target` sudo nixos-rebuild switch {{extra_flags}} --accept-flake-config --flake \"git+https://codeberg.org/noe/nixos.git?ref={{branch}}\&rev={{commit}}#{{target_host}}\"
|
||||
|
||||
deploy2 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; }
|
||||
nixos-rebuild switch {{extra_flags}} --target-host root@`cat nixos/hosts/{{target_host}}/.target` --accept-flake-config --flake .#{{target_host}}
|
||||
|
||||
#
|
||||
ssh target_host *args='':
|
||||
@test -f nixos/hosts/{{target_host}}/.target || { echo "Cannot SSH, add a .target file with SSH destination"; exit 1; }
|
||||
|
|
Loading…
Add table
Reference in a new issue