diff --git a/configurations/host/waffentrager/services/postgresql.nix b/configurations/host/waffentrager/services/postgresql.nix index 7e0f97c..eb067f7 100644 --- a/configurations/host/waffentrager/services/postgresql.nix +++ b/configurations/host/waffentrager/services/postgresql.nix @@ -1,7 +1,7 @@ { materusArg, config, lib, pkgs, ... }: { options.waffentragerService.postgresql.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable postgresql"; - + options.waffentragerService.postgresql.version = lib.mkOption { default = "16"; }; config = let @@ -11,8 +11,8 @@ waffentragerService.elements.enable = true; services.postgresql.enable = true; - services.postgresql.package = pkgs.postgresql_16; - services.postgresql.dataDir = "${config.waffentragerService.elements.postgresqlDir}/16"; + services.postgresql.package = pkgs."postgresql_${cfg.version}"; + services.postgresql.dataDir = "${config.waffentragerService.elements.postgresqlDir}/${cfg.version}"; systemd.services.postgresql = { partOf = [ "elements-mount.service" ]; requires = [ "elements-mount.service" ];