22
0
mirror of https://github.com/SuperSandro2000/nixos-modules.git synced 2024-06-11 10:44:10 +02:00

gitea: remove duplicated ldap on option name, remove usage of deprecated option

This commit is contained in:
Sandro - 2023-12-27 00:04:01 +01:00
parent 8516f8fe15
commit 061451e86b
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -19,7 +19,7 @@ in
description = lib.mdDoc "Name of the ldap group that grants admin access in gitea.";
};
ldapSearchUserPasswordFile = lib.mkOption {
searchUserPasswordFile = lib.mkOption {
type = with lib.types; nullOr str;
default = null;
example = "/var/lib/secrets/search-user-password";
@ -64,7 +64,7 @@ in
};
imports = [
(lib.mkRenamedOptionModule [ "services" "gitea" "ldap" "bindPasswordFile" ] [ "services" "gitea" "ldap" "ldapSearchUserPasswordFile" ])
(lib.mkRenamedOptionModule [ "services" "gitea" "ldap" "bindPasswordFile" ] [ "services" "gitea" "ldap" "searchUserPasswordFile" ])
];
config.services.gitea = lib.mkIf (cfg.enable && cfgl.enable) {
@ -74,7 +74,7 @@ in
host = ldap.domainName;
inherit (ldap) port;
bind-dn = ldap.bindDN;
bind-password = "$(cat ${cfgl.bindPasswordFile})";
bind-password = "$(cat ${cfgl.searchUserPasswordFile})";
user-search-base = ldap.userBaseDN;
user-filter = ldap.searchFilterWithGroupFilter cfgl.userGroup (ldap.userFilter "%[1]s");
admin-filter = ldap.groupFilter cfgl.adminGroup;