From 5f14c876bdba6208075095f49feb0e3d313f646f Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Tue, 1 Oct 2024 02:34:13 +0200 Subject: [PATCH] nixos/redmine: Allow specifying an IP address Redmine should bind to In order to not expose Redmine over all interfaces, allow configuring an IP address it should bind to. Listen to 0.0.0.0 by default. Signed-off-by: Felix Singer --- nixos/modules/services/misc/redmine.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix index 026e4eae6d70..549228a4dae4 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -74,6 +74,12 @@ in description = "Group under which Redmine is ran."; }; + address = mkOption { + type = types.str; + default = "0.0.0.0"; + description = "IP address Redmine should bind to."; + }; + port = mkOption { type = types.port; default = 3000; @@ -429,7 +435,7 @@ in Group = cfg.group; TimeoutSec = "300"; WorkingDirectory = "${cfg.package}/share/redmine"; - ExecStart="${bundle} exec rails server -u webrick -e production -p ${toString cfg.port} -P '${cfg.stateDir}/redmine.pid'"; + ExecStart="${bundle} exec rails server -u webrick -e production -b ${toString cfg.address} -p ${toString cfg.port} -P '${cfg.stateDir}/redmine.pid'"; }; };