From 2434ee4aab06d2c6a5835bbc5a0e49cc78949429 Mon Sep 17 00:00:00 2001 From: Oliver Matthews Date: Sat, 13 Jun 2015 15:14:47 +0000 Subject: [PATCH] Allow setting mediatomb interface --- nixos/modules/services/misc/mediatomb.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/mediatomb.nix b/nixos/modules/services/misc/mediatomb.nix index 3f70bceb23b9..40ec2831ff09 100644 --- a/nixos/modules/services/misc/mediatomb.nix +++ b/nixos/modules/services/misc/mediatomb.nix @@ -230,6 +230,13 @@ in { ''; }; + interface = mkOption { + default = ""; + description = '' + A specific interface to bind to. + ''; + }; + uuid = mkOption { default = "fdfc8a4e-a3ad-4c1d-b43d-a2eedb03a687"; description = '' @@ -256,7 +263,7 @@ in { after = [ "local-fs.target" "network.target" ]; wantedBy = [ "multi-user.target" ]; path = [ pkgs.mediatomb ]; - serviceConfig.ExecStart = "${pkgs.mediatomb}/bin/mediatomb -p ${toString cfg.port} ${if cfg.customCfg then "" else "-c ${mtConf}"} -m ${cfg.dataDir}"; + serviceConfig.ExecStart = "${pkgs.mediatomb}/bin/mediatomb -p ${toString cfg.port} ${if cfg.interface!="" then "-e ${cfg.interface}" else ""} ${if cfg.customCfg then "" else "-c ${mtConf}"} -m ${cfg.dataDir}"; serviceConfig.User = "${cfg.user}"; };