infrastructure/nixos-modules/postgresql/default.nix

23 lines
403 B
Nix
Raw Normal View History

2024-10-02 15:52:04 +02:00
{
config,
pkgs,
lib,
...
}:
let
cfg = config.qois.postgresql;
in
with lib;
{
options.qois.postgresql = {
enable = mkEnableOption ''Enable postgresql services with defaults'';
};
config = mkIf cfg.enable {
services.postgresql.enable = true;
services.postgresqlBackup.enable = true;
qois.backup-client.includePaths = [ config.services.postgresqlBackup.location ];
};
}