extraOptions -> settings

This commit is contained in:
niten 2022-12-08 16:31:06 -08:00
parent 69541726aa
commit 2e07480473
1 changed files with 28 additions and 29 deletions

View File

@ -219,9 +219,8 @@ in {
user = cfg.smtp.username; user = cfg.smtp.username;
passwordFile = cfg.smtp.password-file; passwordFile = cfg.smtp.password-file;
}; };
};
extraOptions = mkIf (cfg.ldap != null) (let ldap.auth = mkIf (cfg.ldap != null) (let
base = cfg.ldap.base-dn; base = cfg.ldap.base-dn;
config-file = pkgs.writeText "grafana-ldap.toml" '' config-file = pkgs.writeText "grafana-ldap.toml" ''
@ -249,15 +248,15 @@ in {
org_role = "Viewer" org_role = "Viewer"
''; '';
in { in {
auth.ldap = {
enabled = true; enabled = true;
allow_sign_up = true; allow_sign_up = true;
config_file = config-file; config_file = config-file;
};
# AUTH_LDAP_ENABLED = "true"; # AUTH_LDAP_ENABLED = "true";
# AUTH_LDAP_ALLOW_SIGN_UP = "true"; # AUTH_LDAP_ALLOW_SIGN_UP = "true";
# AUTH_LDAP_CONFIG_FILE = config-file; # AUTH_LDAP_CONFIG_FILE = config-file;
}); });
};
database = { database = {
host = cfg.database.hostname; host = cfg.database.hostname;