lldap: only enforce groups
This commit is contained in:
parent
154fab216e
commit
485e7474c4
2 changed files with 29 additions and 2 deletions
|
|
@ -365,6 +365,15 @@
|
||||||
"blocks-lldap-options-shb.lldap.enable": [
|
"blocks-lldap-options-shb.lldap.enable": [
|
||||||
"blocks-lldap.html#blocks-lldap-options-shb.lldap.enable"
|
"blocks-lldap.html#blocks-lldap-options-shb.lldap.enable"
|
||||||
],
|
],
|
||||||
|
"blocks-lldap-options-shb.lldap.enforceGroups": [
|
||||||
|
"blocks-lldap.html#blocks-lldap-options-shb.lldap.enforceGroups"
|
||||||
|
],
|
||||||
|
"blocks-lldap-options-shb.lldap.enforceUserMemberships": [
|
||||||
|
"blocks-lldap.html#blocks-lldap-options-shb.lldap.enforceUserMemberships"
|
||||||
|
],
|
||||||
|
"blocks-lldap-options-shb.lldap.enforceUsers": [
|
||||||
|
"blocks-lldap.html#blocks-lldap-options-shb.lldap.enforceUsers"
|
||||||
|
],
|
||||||
"blocks-lldap-options-shb.lldap.ensureGroupFields": [
|
"blocks-lldap-options-shb.lldap.ensureGroupFields": [
|
||||||
"blocks-lldap.html#blocks-lldap-options-shb.lldap.ensureGroupFields"
|
"blocks-lldap.html#blocks-lldap-options-shb.lldap.ensureGroupFields"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ in
|
||||||
description = ''
|
description = ''
|
||||||
Create the users defined here on service startup.
|
Create the users defined here on service startup.
|
||||||
|
|
||||||
If `enforceEnsure` option is `true`, the groups
|
If `enforceUsers` option is `true`, the groups
|
||||||
users belong to must be present in the `ensureGroups` option.
|
users belong to must be present in the `ensureGroups` option.
|
||||||
|
|
||||||
Non-default options must be added to the `ensureGroupFields` option.
|
Non-default options must be added to the `ensureGroupFields` option.
|
||||||
|
|
@ -302,6 +302,24 @@ in
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enforceUsers = mkOption {
|
||||||
|
description = "Delete users not set declaratively.";
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
enforceUserMemberships = mkOption {
|
||||||
|
description = "Remove users from groups not set declaratively.";
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
enforceGroups = mkOption {
|
||||||
|
description = "Remove groups not set declaratively.";
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -339,7 +357,7 @@ in
|
||||||
services.lldap = {
|
services.lldap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
enforceEnsure = true;
|
inherit (cfg) enforceUsers enforceUserMemberships enforceGroups;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
RUST_LOG = lib.mkIf cfg.debug "debug";
|
RUST_LOG = lib.mkIf cfg.debug "debug";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue