All attrs of settings must be INI atoms

This commit is contained in:
niten 2023-12-10 09:56:15 -08:00
parent 4ae833c410
commit f97f3b62c0
1 changed files with 15 additions and 15 deletions

View File

@ -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'"
];
};
};
};