This commit is contained in:
Jean-Marie 'Histausse' Mineau 2024-02-12 23:00:04 +01:00
parent e1f483126c
commit e108f7410c
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -53,9 +53,9 @@ in
services.forgejo.settings.session.COOKIE_SECURE = lib.mkForce true; # Why do I need to override this???
# If true, openid users cannot create new account
#services.forgejo.settings.service.DISABLE_REGISTRATION = lib.mkForce (!cfg.openIdEnable);
#services.forgejo.settings.service.DISABLE_REGISTRATION = lib.mkForce (!cfg.openIdEnabled);
services.forgejo.settings.service.DISABLE_REGISTRATION = lib.mkForce false;
services.forgejo.settings.service.ALLOW_ONLY_EXTERNAL_REGISTRATION = cfg.openIdEnable;
services.forgejo.settings.service.ALLOW_ONLY_EXTERNAL_REGISTRATION = cfg.openIdEnabled;
services.forgejo.lfs.enable = true;
services.forgejo.settings.server.DOMAIN = cfg.domain;
@ -121,7 +121,7 @@ in
proxy_pass_request_headers on;
'';
};
locations."/user/login" = lib.mkIf (cfg.openIdEnable) {
locations."/user/login" = lib.mkIf (cfg.openIdEnabled) {
return = "301 https://$host/user/oauth2/${cfg.openIdClientName}";
};
};