feat: improve justfiles
This commit is contained in:
parent
eab9e8b58d
commit
3730ab856b
3 changed files with 39 additions and 34 deletions
|
|
@ -1,11 +1,14 @@
|
|||
@_default: list
|
||||
set unstable := true
|
||||
set quiet := true
|
||||
|
||||
_default: list
|
||||
|
||||
[doc('List machines')]
|
||||
@list:
|
||||
list:
|
||||
ls -1 ../systems/x86_64-linux/
|
||||
|
||||
[doc('Update the target machine')]
|
||||
[no-exit-message]
|
||||
@update machine:
|
||||
just assert '-d "../systems/x86_64-linux/{{ machine }}"' "Machine {{ machine }} does not exist, must be one of: $(ls ../systems/x86_64-linux/ | sed ':a;N;$!ba;s/\n/, /g')"
|
||||
nixos-rebuild switch -L --use-remote-sudo --target-host {{ machine }} --flake ..#{{ machine }}
|
||||
update machine:
|
||||
just assert '-d "../systems/x86_64-linux/{{ machine }}"' "Machine {{ machine }} does not exist, must be one of: $(ls ../systems/x86_64-linux/ | tr '\n' ' ')"
|
||||
nixos-rebuild switch --use-remote-sudo --target-host {{ machine }} --flake ..#{{ machine }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue