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