2022-01-15 20:50:42 +00:00
|
|
|
{ config, lib, ... }: {
|
2022-01-15 20:42:50 +00:00
|
|
|
services.postgresql = {
|
2022-01-15 20:12:12 +00:00
|
|
|
enable = true;
|
|
|
|
enableTCPIP = true;
|
2022-01-15 20:46:08 +00:00
|
|
|
authentication = "host all all fd0d:a262:1fa6:e621::/64 md5";
|
2022-01-15 20:12:12 +00:00
|
|
|
};
|
2022-01-15 20:58:11 +00:00
|
|
|
services.postgresqlBackup = {
|
|
|
|
enable = true;
|
|
|
|
compression = "none"; # the file system and restic both do compression
|
|
|
|
};
|
2022-01-15 20:50:42 +00:00
|
|
|
services.prometheus.exporters.postgres = {
|
|
|
|
enable = true;
|
2022-01-15 20:53:08 +00:00
|
|
|
user = "postgres";
|
2022-01-15 20:50:42 +00:00
|
|
|
listenAddress = (import ../../utils/getInternalIP.nix config).listenIP;
|
|
|
|
};
|
2022-01-15 20:12:12 +00:00
|
|
|
}
|