X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fdatabases%2Fopenldap_replication.nix;fp=modules%2Fprivate%2Fdatabases%2Fopenldap_replication.nix;h=b456323460c2234bb0e6f30ea13f9b719c01eac8;hp=350eecfc2a02a41de3d02b102dc6e72473a4acac;hb=4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0;hpb=da30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2 diff --git a/modules/private/databases/openldap_replication.nix b/modules/private/databases/openldap_replication.nix index 350eecf..b456323 100644 --- a/modules/private/databases/openldap_replication.nix +++ b/modules/private/databases/openldap_replication.nix @@ -87,9 +87,8 @@ in }; users.groups.openldap.gid = config.ids.gids.openldap; - secrets.keys = lib.flatten (lib.mapAttrsToList (name: hcfg: [ - { - dest = "openldap_replication/${name}/replication_config"; + secrets.keys = lib.listToAttrs (lib.flatten (lib.mapAttrsToList (name: hcfg: [ + (lib.nameValuePair "openldap_replication/${name}/replication_config" { user = "openldap"; group = "openldap"; permissions = "0400"; @@ -105,15 +104,14 @@ in binddn="${hcfg.dn}" credentials="${hcfg.password}" ''; - } - { - dest = "openldap_replication/${name}/replication_password"; + }) + (lib.nameValuePair "openldap_replication/${name}/replication_password" { user = "openldap"; group = "openldap"; permissions = "0400"; text = hcfg.password; - } - ]) cfg.hosts); + }) + ]) cfg.hosts)); services.cron = { enable = true;