use credentials to fix perms
This commit is contained in:
parent
c7ee87df1c
commit
382d643573
1 changed files with 13 additions and 2 deletions
|
|
@ -1,5 +1,16 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
secretName = "grafanaSecret";
|
||||||
|
passwordName = "grafanaPassword";
|
||||||
|
credentialDirectory = "/run/credentials/grafana.service/";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
systemd.services.grafana.serviceConfig.LoadCredential = [
|
||||||
|
"${secretName}:${config.age.secrets."grafanaSecret.age".path}"
|
||||||
|
"${passwordName}:${config.age.secrets."grafanaPassword.age".path}"
|
||||||
|
];
|
||||||
|
|
||||||
services =
|
services =
|
||||||
let
|
let
|
||||||
domain = "status.federated.nexus";
|
domain = "status.federated.nexus";
|
||||||
|
|
@ -20,10 +31,10 @@
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
cookie_secure = true;
|
cookie_secure = true;
|
||||||
secret_key = "$__file{${config.age.secrets."grafanaSecret.age".path}}";
|
secret_key = "$__file{${credentialDirectory}${secretName}}";
|
||||||
|
|
||||||
admin_user = "quadradical";
|
admin_user = "quadradical";
|
||||||
admin_password = "$__file{${config.age.secrets."grafanaPassword.age".path}}";
|
admin_password = "$__file{${credentialDirectory}${passwordName}}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue