ldap: fix permissions for backend scripts
This commit is contained in:
parent
5a6928fbd3
commit
43de0b8da9
1 changed files with 4 additions and 3 deletions
|
@ -68,7 +68,7 @@
|
||||||
USERS_BANNED = lib.strings.concatStringsSep "," cfg.users.banned;
|
USERS_BANNED = lib.strings.concatStringsSep "," cfg.users.banned;
|
||||||
};
|
};
|
||||||
|
|
||||||
service_name = script: lib.strings.sanitizeDerivationName("${cfg.prefix}${cfg.user}@${script}");
|
service_name = script: lib.strings.sanitizeDerivationName("${cfg.user}@${script}");
|
||||||
|
|
||||||
# oneshot scripts to run
|
# oneshot scripts to run
|
||||||
serviceGenerator = mapAttrs' (script: time: nameValuePair (service_name script) {
|
serviceGenerator = mapAttrs' (script: time: nameValuePair (service_name script) {
|
||||||
|
@ -79,7 +79,8 @@
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
DynamicUser = true;
|
User = "${cfg.user}";
|
||||||
|
Group = "${cfg.user}";
|
||||||
ExecStart = "${self.defaultPackage."${system}"}/bin/${script}";
|
ExecStart = "${self.defaultPackage."${system}"}/bin/${script}";
|
||||||
EnvironmentFile = "${cfg.envFile}";
|
EnvironmentFile = "${cfg.envFile}";
|
||||||
};
|
};
|
||||||
|
@ -179,7 +180,7 @@
|
||||||
|
|
||||||
home = mkOption rec {
|
home = mkOption rec {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "/etc/skynet_${package_name}";
|
default = "/etc/${cfg.prefix}${package_name}";
|
||||||
description = "The home for the user";
|
description = "The home for the user";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue