1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: generate caddy basic auth passwords using agenix-rekey

This commit is contained in:
oddlama 2023-06-10 00:52:17 +02:00
parent cfb7c88862
commit e61c82ebfc
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 42 additions and 10 deletions

View file

@ -2,6 +2,7 @@
config,
nodes,
nixos-hardware,
nodeName,
pkgs,
...
}: let
@ -100,6 +101,7 @@ in {
age.secrets.loki-basic-auth-password = {
rekeyFile = ./secrets/loki-basic-auth-password.age;
generator = "alnum";
mode = "440";
group = "grafana";
};
@ -165,7 +167,7 @@ in {
url = "https://${lokiDomain}";
orgId = 1;
basicAuth = true;
basicAuthUser = "iB6UEjt4so4xWqei";
basicAuthUser = nodeName;
secureJsonData.basicAuthPassword = "$__file{${config.age.secrets.loki-basic-auth-password.path}}";
}
];