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:
parent
cfb7c88862
commit
e61c82ebfc
4 changed files with 42 additions and 10 deletions
|
@ -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}}";
|
||||
}
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue