]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/databases/default.nix
Allow old host to access database
[perso/Immae/Config/Nix.git] / nixops / modules / databases / default.nix
index d86373ade13f9fe71d02db895856ca2125ba8842..1115a29e314f975072cdb73269f4b50202f43c57 100644 (file)
@@ -105,7 +105,8 @@ in {
       extraConfig = ''
         max_connections = 100
         wal_level = logical
-        shared_buffers = 128MB
+        shared_buffers = 512MB
+        work_mem = 10MB
         max_wal_size = 1GB
         min_wal_size = 80MB
         log_timezone = 'Europe/Paris'
@@ -123,7 +124,9 @@ in {
       authentication = ''
         local  all     postgres                                ident
         local  all     all                                     md5
-        hostssl        all     all             all                     pam
+        hostssl        all     all     188.165.209.148/32              md5
+        hostssl        all     all     178.33.252.96/32                md5
+        hostssl        all     all     all                             pam
         hostssl        replication     backup-1        2001:41d0:302:1100::9:e5a9/128  pam pamservice=postgresql_replication
         hostssl        replication     backup-1        54.37.151.137/32                pam pamservice=postgresql_replication
       '';
@@ -182,6 +185,10 @@ in {
       }
     ];
 
+    ids.uids.redis = myconfig.env.users.redis.uid;
+    ids.gids.redis = myconfig.env.users.redis.gid;
+    users.users.redis.uid = config.ids.uids.redis;
+    users.groups.redis.gid = config.ids.gids.redis;
     services.redis = rec {
       enable = config.services.myDatabases.redis.enable;
       bind = "127.0.0.1";