aboutsummaryrefslogtreecommitdiff
path: root/modules/private/databases/redis_replication.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-16 17:40:07 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-16 20:20:45 +0200
commit4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0 (patch)
tree9a7ede9ac3f1899074e9ef568a447f883191d3b5 /modules/private/databases/redis_replication.nix
parentda30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2 (diff)
downloadNix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.gz
Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.zst
Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.zip
Use attrs for secrets instead of lists
Diffstat (limited to 'modules/private/databases/redis_replication.nix')
-rw-r--r--modules/private/databases/redis_replication.nix14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/private/databases/redis_replication.nix b/modules/private/databases/redis_replication.nix
index 3caa7e9..9e48939 100644
--- a/modules/private/databases/redis_replication.nix
+++ b/modules/private/databases/redis_replication.nix
@@ -68,9 +68,8 @@ in
68 }; 68 };
69 }; 69 };
70 70
71 secrets.keys = lib.flatten (lib.mapAttrsToList (name: hcfg: [ 71 secrets.keys = lib.mapAttrs' (name: hcfg:
72 { 72 lib.nameValuePair "redis_replication/${name}/config" {
73 dest = "redis_replication/${name}/config";
74 user = "redis"; 73 user = "redis";
75 group = "redis"; 74 group = "redis";
76 permissions = "0400"; 75 permissions = "0400";
@@ -97,15 +96,14 @@ in
97 maxclients 1024 96 maxclients 1024
98 ''; 97 '';
99 } 98 }
100 ]) cfg.hosts) ++ [ 99 ) cfg.hosts // {
101 { # For eldiron only 100 "redis/spiped_eldiron_keyfile" = { # For eldiron only
102 dest = "redis/spiped_eldiron_keyfile";
103 user = "spiped"; 101 user = "spiped";
104 group = "spiped"; 102 group = "spiped";
105 permissions = "0400"; 103 permissions = "0400";
106 text = config.myEnv.databases.redis.spiped_key; 104 text = config.myEnv.databases.redis.spiped_key;
107 } 105 };
108 ]; 106 };
109 107
110 services.cron = { 108 services.cron = {
111 enable = true; 109 enable = true;