X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fdatabases%2Fopenldap%2Fdefault.nix;h=f4851b5f885a09d3d98ff6994526619b873f2897;hp=e00f4c2af03b4201196224c2e4d150bc6c2e309e;hb=da30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2;hpb=bd5c5d4e23ebd3863a960976767ed4a83dfd07fe diff --git a/modules/private/databases/openldap/default.nix b/modules/private/databases/openldap/default.nix index e00f4c2..f4851b5 100644 --- a/modules/private/databases/openldap/default.nix +++ b/modules/private/databases/openldap/default.nix @@ -98,7 +98,14 @@ in permissions = "0400"; user = "openldap"; group = "openldap"; - text = builtins.readFile "${cfg.accessFile}"; + text = builtins.readFile cfg.accessFile; + } + { + dest = "ldap"; + permissions = "0500"; + user = "openldap"; + group = "openldap"; + isDir = true; } ]; users.users.openldap.extraGroups = [ "keys" ]; @@ -115,7 +122,7 @@ in services.filesWatcher.openldap = { restart = true; - paths = [ "${config.secrets.location}/ldap/" ]; + paths = [ config.secrets.fullPaths."ldap" ]; }; services.openldap = { @@ -132,9 +139,9 @@ in overlay syncprov syncprov-checkpoint 100 10 - include ${config.secrets.location}/ldap/access + include ${config.secrets.fullPaths."ldap/access"} ''; - rootpwFile = "${config.secrets.location}/ldap/password"; + rootpwFile = config.secrets.fullPaths."ldap/password"; suffix = cfg.baseDn; rootdn = cfg.rootDn; database = "hdb";