From 6398aaf663447f1e4c1abc9a09cf5b140bb0e491 Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Thu, 27 May 2021 18:15:46 +0200 Subject: [PATCH] nix: add option for postgres port --- nix/module.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nix/module.nix b/nix/module.nix index c4b23ef7e..99b2aa9cb 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -22,6 +22,7 @@ let STATIC_ROOT = (builtins.toPath cfg.stateDir) + "/static"; POSTGRES_HOST = cfg.database.host; POSTGRES_USER = cfg.database.user; + POSTGRES_PORT = (toString cfg.database.port); POSTGRES_DB = cfg.database.database; REDIS_ACTIVITY_HOST = cfg.activityRedis.host; REDIS_ACTIVITY_PORT = (toString cfg.activityRedis.port); @@ -152,13 +153,11 @@ in ''; }; - # this is currently hardcoded - - # port = mkOption { - # type = types.int; - # default = config.services.postgresql.port; - # description = "Port of the Postgresql server to connect to."; - #}; + port = mkOption { + type = types.int; + default = config.services.postgresql.port; + description = "Port of the Postgresql server to connect to."; + }; database = mkOption { type = types.str;