diff options
Diffstat (limited to 'modules/private/databases/openldap_replication.nix')
-rw-r--r-- | modules/private/databases/openldap_replication.nix | 14 |
1 files changed, 6 insertions, 8 deletions
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 | |||
87 | }; | 87 | }; |
88 | users.groups.openldap.gid = config.ids.gids.openldap; | 88 | users.groups.openldap.gid = config.ids.gids.openldap; |
89 | 89 | ||
90 | secrets.keys = lib.flatten (lib.mapAttrsToList (name: hcfg: [ | 90 | secrets.keys = lib.listToAttrs (lib.flatten (lib.mapAttrsToList (name: hcfg: [ |
91 | { | 91 | (lib.nameValuePair "openldap_replication/${name}/replication_config" { |
92 | dest = "openldap_replication/${name}/replication_config"; | ||
93 | user = "openldap"; | 92 | user = "openldap"; |
94 | group = "openldap"; | 93 | group = "openldap"; |
95 | permissions = "0400"; | 94 | permissions = "0400"; |
@@ -105,15 +104,14 @@ in | |||
105 | binddn="${hcfg.dn}" | 104 | binddn="${hcfg.dn}" |
106 | credentials="${hcfg.password}" | 105 | credentials="${hcfg.password}" |
107 | ''; | 106 | ''; |
108 | } | 107 | }) |
109 | { | 108 | (lib.nameValuePair "openldap_replication/${name}/replication_password" { |
110 | dest = "openldap_replication/${name}/replication_password"; | ||
111 | user = "openldap"; | 109 | user = "openldap"; |
112 | group = "openldap"; | 110 | group = "openldap"; |
113 | permissions = "0400"; | 111 | permissions = "0400"; |
114 | text = hcfg.password; | 112 | text = hcfg.password; |
115 | } | 113 | }) |
116 | ]) cfg.hosts); | 114 | ]) cfg.hosts)); |
117 | 115 | ||
118 | services.cron = { | 116 | services.cron = { |
119 | enable = true; | 117 | enable = true; |