Skip to content

Commit

Permalink
mcaptcha: Only own mcaptcha DB
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzleutgeb committed Apr 12, 2024
1 parent dce3fcf commit aa72e8b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modules/mcaptcha.nix
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,11 @@ in {
ensureUsers = [
{
name = cfg.user;
ensureDBOwnership = true;
}
];
};

systemd.services.postgresql.postStart = lib.mkIf cfg.database.createLocally (lib.mkAfter ''
$PSQL ${cfg.settings.database.name} -c 'GRANT ALL PRIVILEGES ON SCHEMA public TO "${cfg.user}"'
'');

services.redis.servers.mcaptcha = lib.mkIf cfg.redis.createLocally {
enable = true;
port = cfg.redis.port;
Expand Down

0 comments on commit aa72e8b

Please sign in to comment.