Skip to content

Commit

Permalink
mcaptcha: replace ensurePermissions
Browse files Browse the repository at this point in the history
Towards #126
  • Loading branch information
mightyiam committed Feb 14, 2024
1 parent 7c20b94 commit dce3fcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/mcaptcha.nix
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,14 @@ in {
ensureUsers = [
{
name = cfg.user;
ensurePermissions = {"DATABASE ${cfg.settings.database.name}" = "ALL PRIVILEGES";};
}
];
};

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 dce3fcf

Please sign in to comment.