mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 21:01:34 +01:00
justfile: Add sops commands
This commit is contained in:
parent
2007dc8e0d
commit
0119af4d40
1 changed files with 12 additions and 3 deletions
15
justfile
15
justfile
|
|
@ -16,9 +16,6 @@ fmt:
|
||||||
check:
|
check:
|
||||||
nix flake check --no-build
|
nix flake check --no-build
|
||||||
|
|
||||||
dev shell='default':
|
|
||||||
nix develop .#{{ shell }} --command $SHELL
|
|
||||||
|
|
||||||
deploy +hosts:
|
deploy +hosts:
|
||||||
deploy --skip-checks --targets $(echo {{ hosts }} | sed 's/[^ ]*/\.#&/g')
|
deploy --skip-checks --targets $(echo {{ hosts }} | sed 's/[^ ]*/\.#&/g')
|
||||||
|
|
||||||
|
|
@ -30,3 +27,15 @@ repair:
|
||||||
|
|
||||||
repl host='$(hostname)':
|
repl host='$(hostname)':
|
||||||
nix repl .#nixosConfigurations.{{ host }}
|
nix repl .#nixosConfigurations.{{ host }}
|
||||||
|
|
||||||
|
_sops-do command:
|
||||||
|
-if command -v sops >/dev/null 2>&1; then {{ command }}; else nix develop .#sops --command bash -c "{{ command }}; exec zsh"; fi
|
||||||
|
|
||||||
|
sops-edit path:
|
||||||
|
just _sops-do "sops edit {{ path }}"
|
||||||
|
|
||||||
|
sops-update:
|
||||||
|
just _sops-do "find . -type f -name 'secrets.json' -exec sops updatekeys --yes {} \;"
|
||||||
|
|
||||||
|
sops-rotate:
|
||||||
|
just _sops-do "find . -type f -name 'secrets.json' -exec sops rotate --in-place {} \;"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue