mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
17 lines
519 B
Nix
17 lines
519 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
serviceName = "postgresql";
|
|
postgresVersion = 14;
|
|
in
|
|
{
|
|
options.swarselsystems.modules.server."${serviceName}" = lib.mkEnableOption "enable ${serviceName} on server";
|
|
config = lib.mkIf config.swarselsystems.modules.server."${serviceName}" {
|
|
services = {
|
|
postgresql = {
|
|
enable = true;
|
|
package = pkgs."postgresql_${builtins.toString postgresVersion}";
|
|
dataDir = "/Vault/data/postgresql/${builtins.toString postgresVersion}";
|
|
};
|
|
};
|
|
};
|
|
}
|