infrastructure/nixos-modules/postgresql/default.nix
Fabian Hauser 462622a077
Some checks failed
CI / build (push) Failing after 44s
Require postgres version to be configured manually
2024-12-06 14:34:21 +02:00

26 lines
515 B
Nix

{
config,
pkgs,
lib,
...
}:
let
cfg = config.qois.postgresql;
in
with lib;
{
options.qois.postgresql = {
enable = mkEnableOption ''Enable postgresql services with defaults'';
package = mkPackageOption pkgs "postgresql" {
example = "postgresql_15";
default = null;
};
};
config = mkIf cfg.enable {
services.postgresql.enable = true;
services.postgresqlBackup.enable = true;
qois.backup-client.includePaths = [ config.services.postgresqlBackup.location ];
};
}