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 =
|
||||
"https://${cfg.oauth.hostname}/application/o/${cfg.oauth.slug}/end-session/";
|
||||
oauth_auto_login = true;
|
||||
};
|
||||
|
||||
generic_oauth = {
|
||||
name = "Authentik";
|
||||
enabled = true;
|
||||
client_id = "$__file{${cfg.oauth.client-id}}";
|
||||
client_secret = "$__file{${cfg.oauth.client-secret}}";
|
||||
scopes = "openid email profile";
|
||||
auth_url = "https://${cfg.oauth.hostname}/application/o/authorize/";
|
||||
token_url = "https://${cfg.oauth.hostname}/application/o/token/";
|
||||
api_url = "https://${cfg.oauth.hostname}/application/o/userinfo/";
|
||||
role_attribute_path = concatStringsSep " || " [
|
||||
"contains(groups[*], 'Metrics Admins') && 'Admin'"
|
||||
"contains(groups[*], 'Metrics Editors') && 'Editor'"
|
||||
"'Viewer'"
|
||||
];
|
||||
};
|
||||
"auth.generic_oauth" = mkIf (!isNull cfg.oauth) {
|
||||
name = "Authentik";
|
||||
enabled = true;
|
||||
client_id = "$__file{${cfg.oauth.client-id}}";
|
||||
client_secret = "$__file{${cfg.oauth.client-secret}}";
|
||||
scopes = "openid email profile";
|
||||
auth_url = "https://${cfg.oauth.hostname}/application/o/authorize/";
|
||||
token_url = "https://${cfg.oauth.hostname}/application/o/token/";
|
||||
api_url = "https://${cfg.oauth.hostname}/application/o/userinfo/";
|
||||
role_attribute_path = concatStringsSep " || " [
|
||||
"contains(groups[*], 'Metrics Admins') && 'Admin'"
|
||||
"contains(groups[*], 'Metrics Editors') && 'Editor'"
|
||||
"'Viewer'"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue