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]
|
[no-exit-message]
|
||||||
@update 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/ | sed ':a;N;$!ba;s/\n/, /g')"
|
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 unstable := true
|
||||||
|
set quiet := true
|
||||||
|
|
||||||
base_path := invocation_directory() / "systems/x86_64-linux"
|
base_path := invocation_directory() / "systems/x86_64-linux"
|
||||||
|
|
||||||
|
|
@ -8,14 +9,14 @@ base_path := invocation_directory() / "systems/x86_64-linux"
|
||||||
sops := "sops"
|
sops := "sops"
|
||||||
yq := "yq"
|
yq := "yq"
|
||||||
|
|
||||||
@_default:
|
_default:
|
||||||
just --list
|
just --list
|
||||||
|
|
||||||
[doc('list all vars of the target machine')]
|
[doc('list all vars of the target machine')]
|
||||||
list machine:
|
list machine:
|
||||||
sops decrypt {{ base_path }}/{{ machine }}/secrets.yml
|
sops decrypt {{ base_path }}/{{ machine }}/secrets.yml
|
||||||
|
|
||||||
@edit machine:
|
edit machine:
|
||||||
sops edit {{ base_path }}/{{ machine }}/secrets.yml
|
sops edit {{ base_path }}/{{ machine }}/secrets.yml
|
||||||
|
|
||||||
@set machine key value:
|
@set machine key value:
|
||||||
|
|
@ -26,10 +27,10 @@ list machine:
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
@get machine key:
|
get machine key:
|
||||||
sops decrypt {{ base_path }}/{{ machine }}/secrets.yml | yq ".$(echo "{{ key }}" | sed -E 's/\//./g')"
|
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')"
|
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
|
git add {{ base_path }}/{{ machine }}/secrets.yml
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ in {
|
||||||
settings = {
|
settings = {
|
||||||
appservice = {
|
appservice = {
|
||||||
provisioning.enabled = false;
|
provisioning.enabled = false;
|
||||||
# port = 40011;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homeserver = {
|
homeserver = {
|
||||||
|
|
@ -118,7 +117,6 @@ in {
|
||||||
settings = {
|
settings = {
|
||||||
appservice = {
|
appservice = {
|
||||||
provisioning.enabled = false;
|
provisioning.enabled = false;
|
||||||
# port = 40012;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homeserver = {
|
homeserver = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue