All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
41 lines
685 B
Nix
41 lines
685 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.modules.services.postgresql;
|
|
in {
|
|
options.modules.services.postgresql = {
|
|
enable = lib.mkOption {
|
|
default = false;
|
|
example = true;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.postgresql = {
|
|
enable = true;
|
|
initdbArgs = [
|
|
"--allow-group-access"
|
|
"--encoding=UTF8"
|
|
"--locale=C"
|
|
];
|
|
settings = {
|
|
log_connections = true;
|
|
log_disconnections = true;
|
|
log_destination = lib.mkForce "syslog";
|
|
};
|
|
};
|
|
|
|
services.borgmatic.settings = {
|
|
postgresql_databases = [
|
|
{
|
|
name = "all";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|