nixos-module: let collectd access postgresql

This commit is contained in:
Astro 2023-08-09 10:37:45 +02:00
parent 8c4340c31c
commit 22a8365564
1 changed files with 4 additions and 0 deletions

View File

@ -156,6 +156,10 @@ in
CREATE DATABASE caveman TEMPLATE template0 ENCODING UTF8;
GRANT ALL PRIVILEGES ON DATABASE caveman TO ${dbUser};
'';
ensureUsers = [ {
name = "collectd";
ensurePermissions."DATABASE caveman" = "SELECT";
} ];
};
services.collectd.plugins.postgresql = ''
<Query hosts_with_tokens>