From 4b4586439d59f9b0bf3d6fe06660e46a8d87f40b Mon Sep 17 00:00:00 2001 From: niten Date: Wed, 13 Sep 2023 10:54:24 -0700 Subject: [PATCH] Don't hardcode issuer... --- matrix-module.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/matrix-module.nix b/matrix-module.nix index 11d9424..ab00ff3 100644 --- a/matrix-module.nix +++ b/matrix-module.nix @@ -13,13 +13,13 @@ let idp_id = cfg.openid.provider; idp_name = cfg.openid.provider; discover = true; - issuer = "https://authentik.fudo.org/application/o/matrix/"; + issuer = cfg.openid.issuer; client_id = cfg.openid.client-id; client_secret = cfg.openid.client-secret; scopes = [ "openid" "profile" "email" ]; user_mapping_provider.config = { localpart_template = "{{ user.preferred_username }}"; - display_name_template = "{{ user.name | capitalize }}"; + display_name_template = "{{ user.name|capitalize }}"; }; }]; }); @@ -73,6 +73,11 @@ in { type = str; description = "OpenID Client Secret."; }; + + issuer = mkOption { + type = str; + description = "OpenID issuer URL."; + }; }; };