nix-server/modules/services/postgres.nix
2024-01-06 03:19:08 -08:00

22 lines
446 B
Nix
Executable file

{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.modules.services.postgres;
in {
options.modules.services.postgres = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf cfg.enable {
services.postgresql = {
enable = true;
# this is set to v14 because im too lazy to migrate data directories
# plz change
package = pkgs.postgresql_14;
};
};
}