All attrs of settings must be INI atoms
This commit is contained in:
parent
4ae833c410
commit
f97f3b62c0
30
grafana.nix
30
grafana.nix
|
@ -124,22 +124,22 @@ in {
|
||||||
signout_redirect_url =
|
signout_redirect_url =
|
||||||
"https://${cfg.oauth.hostname}/application/o/${cfg.oauth.slug}/end-session/";
|
"https://${cfg.oauth.hostname}/application/o/${cfg.oauth.slug}/end-session/";
|
||||||
oauth_auto_login = true;
|
oauth_auto_login = true;
|
||||||
|
};
|
||||||
|
|
||||||
generic_oauth = {
|
"auth.generic_oauth" = mkIf (!isNull cfg.oauth) {
|
||||||
name = "Authentik";
|
name = "Authentik";
|
||||||
enabled = true;
|
enabled = true;
|
||||||
client_id = "$__file{${cfg.oauth.client-id}}";
|
client_id = "$__file{${cfg.oauth.client-id}}";
|
||||||
client_secret = "$__file{${cfg.oauth.client-secret}}";
|
client_secret = "$__file{${cfg.oauth.client-secret}}";
|
||||||
scopes = "openid email profile";
|
scopes = "openid email profile";
|
||||||
auth_url = "https://${cfg.oauth.hostname}/application/o/authorize/";
|
auth_url = "https://${cfg.oauth.hostname}/application/o/authorize/";
|
||||||
token_url = "https://${cfg.oauth.hostname}/application/o/token/";
|
token_url = "https://${cfg.oauth.hostname}/application/o/token/";
|
||||||
api_url = "https://${cfg.oauth.hostname}/application/o/userinfo/";
|
api_url = "https://${cfg.oauth.hostname}/application/o/userinfo/";
|
||||||
role_attribute_path = concatStringsSep " || " [
|
role_attribute_path = concatStringsSep " || " [
|
||||||
"contains(groups[*], 'Metrics Admins') && 'Admin'"
|
"contains(groups[*], 'Metrics Admins') && 'Admin'"
|
||||||
"contains(groups[*], 'Metrics Editors') && 'Editor'"
|
"contains(groups[*], 'Metrics Editors') && 'Editor'"
|
||||||
"'Viewer'"
|
"'Viewer'"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue