-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
28 lines (22 loc) · 1.05 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
python_executable := if os() == "android" { "python3" } else { "nix develop ..# -c python3" }
list:
just -l
# grab a new nitter guest account and save it
nitter-token:
{{python_executable}} nitter-guest-account.py tokens.json
# sync sops config with the nix file
update-sops-config:
#!/usr/bin/env bash
set -euxo pipefail
rm ../.sops.yaml || true
# mv ../.sops.yaml{,.bak} 2>/dev/null || true
OUT=$(nix-build build-yaml.nix --argstr name ".sops.yaml" --arg content "import ../.sops.nix")
echo -e "# WARNING: This is a generated file. DO NOT EDIT DIRECTLY!\n# See .sops.nix and utils/build-yaml.nix for more details." \
| cat - $OUT > ../.sops.yaml
for file in ../creds/sops/**/*; do sops updatekeys $file; done
rotate-sops-keys:
for file in ../creds/sops/**/*; do sops -i -r $file; done
add-grafana-dashboard id name *title="":
xh https://grafana.com/api/dashboards/{{id}} | \
jq '.json | .uid="{{name}}" {{ if title != "" {"| .title=\"" + title + "\"" } else {""} }}' \
-c > ../systems/koumakan/services/telemetry/grafana/dashboards/{{name}}.json