chore: clean up code
This commit is contained in:
parent
7751f756b7
commit
ddf66697cb
3 changed files with 6 additions and 7 deletions
|
|
@ -8,4 +8,4 @@
|
|||
[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 }}
|
||||
nixos-rebuild switch -L --sudo --target-host {{ machine }} --flake ..#{{ machine }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
set unstable := true
|
||||
set quiet := true
|
||||
|
||||
base_path := invocation_directory() / "systems/x86_64-linux"
|
||||
|
||||
|
|
@ -8,14 +9,14 @@ base_path := invocation_directory() / "systems/x86_64-linux"
|
|||
sops := "sops"
|
||||
yq := "yq"
|
||||
|
||||
@_default:
|
||||
_default:
|
||||
just --list
|
||||
|
||||
[doc('list all vars of the target machine')]
|
||||
list machine:
|
||||
sops decrypt {{ base_path }}/{{ machine }}/secrets.yml
|
||||
|
||||
@edit machine:
|
||||
edit machine:
|
||||
sops edit {{ base_path }}/{{ machine }}/secrets.yml
|
||||
|
||||
@set machine key value:
|
||||
|
|
@ -26,10 +27,10 @@ list machine:
|
|||
|
||||
echo "Done"
|
||||
|
||||
@get machine key:
|
||||
get machine key:
|
||||
sops decrypt {{ base_path }}/{{ machine }}/secrets.yml | yq ".$(echo "{{ key }}" | sed -E 's/\//./g')"
|
||||
|
||||
@remove machine key:
|
||||
remove machine key:
|
||||
sops unset {{ base_path }}/{{ machine }}/secrets.yml "$(printf '%s\n' '["{{ key }}"]' | sed -E 's#/#"]["#g; s/\["([0-9]+)"\]/[\1]/g')"
|
||||
|
||||
git add {{ base_path }}/{{ machine }}/secrets.yml
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ in {
|
|||
settings = {
|
||||
appservice = {
|
||||
provisioning.enabled = false;
|
||||
# port = 40011;
|
||||
};
|
||||
|
||||
homeserver = {
|
||||
|
|
@ -118,7 +117,6 @@ in {
|
|||
settings = {
|
||||
appservice = {
|
||||
provisioning.enabled = false;
|
||||
# port = 40012;
|
||||
};
|
||||
|
||||
homeserver = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue