};
system.activationScripts.postgresql = ''
- install -m 0755 -o postgres -g postgres -d /run/postgresql
+ install -m 0755 -o postgres -g postgres -d ${myconfig.env.databases.postgresql.socket}
'';
services.postgresql = rec {
}
];
- # Diaspora: 15
- # Nextcloud: 14
- # Mastodon: 13
- # Mediagoblin: 12
- # wallabag: 0 ?
services.redis = rec {
enable = config.services.myDatabases.redis.enable;
bind = "127.0.0.1";
- unixSocket = "/run/redis/redis.sock";
+ unixSocket = myconfig.env.databases.redis.socket;
extraConfig = ''
unixsocketperm 777
maxclients 1024
'';
};
system.activationScripts.redis = ''
- mkdir -p /run/redis
- chown redis /run/redis
+ mkdir -p $(dirname ${myconfig.env.databases.redis.socket})
+ chown redis $(dirname ${myconfig.env.databases.redis.socket})
'';
};
}