[READ-ONLY] Mirror of https://github.com/alyraffauf/infra. Hybrid cloud cluster monorepo with Ansible, K8s, NixOS, and Terraform. cute.haus
ansible k8s nix nix-flake nixos terraform
0

Configure Feed

Select the types of activity you want to include in your feed.

infra / .envrc
996 B 27 lines
1# shellcheck disable=SC2148 2export DIRENV_WARN_TIMEOUT=0 3export NIXPKGS_ALLOW_UNFREE=1 4use flake . --impure 5 6export_sops_secret() { 7 local var_name="$1" file="$2" key="$3" value 8 if value=$(sops -d --extract "$key" "$file" 2>/dev/null); then 9 export "$var_name=$value" 10 else 11 echo "direnv: skipping $var_name (could not decrypt $file)" >&2 12 fi 13} 14 15export_sops_secret CLOUDFLARE_API_TOKEN secrets/cloudflare.yaml '["api_token"]' 16export_sops_secret HCLOUD_TOKEN secrets/hetzner.yaml '["api_token"]' 17 18# Terraform's s3 backend (pointing at B2) reads these. 19export_sops_secret AWS_ACCESS_KEY_ID secrets/b2.yaml '["B2_KEY_ID"]' 20export_sops_secret AWS_SECRET_ACCESS_KEY secrets/b2.yaml '["B2_APP_KEY"]' 21 22# B2 native provider reads these. 23export_sops_secret B2_APPLICATION_KEY_ID secrets/b2.yaml '["B2_KEY_ID"]' 24export_sops_secret B2_APPLICATION_KEY secrets/b2.yaml '["B2_APP_KEY"]' 25 26# Tailscale provider reads this. 27export_sops_secret TAILSCALE_API_KEY secrets/tailscale-api.yaml '["api_key"]'