From c55bee059fced324b9f6ac6cef476dea7d71d958 Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Tue, 14 Jul 2020 00:10:45 +0100 Subject: update dlnatoad; add dlnatoad.interfaces config option --- nixos/modules/services/dlnatoad.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/dlnatoad.nix b/nixos/modules/services/dlnatoad.nix index 8f50c72..5b31fb8 100644 --- a/nixos/modules/services/dlnatoad.nix +++ b/nixos/modules/services/dlnatoad.nix @@ -12,6 +12,12 @@ in { options.eth.services.dlnatoad = { enable = mkEnableOption "Whether to enable DLNAtoad"; + interface = mkOption { + type = types.str; + default = ""; + description = "Hostname or IP address of interface to bind to."; + }; + directories = mkOption { type = types.listOf types.str; default = []; @@ -34,7 +40,14 @@ in { CacheDirectory = systemdDirectoryName; - ExecStart = "${pkgs.eth.dlnatoad}/bin/dlnatoad ${concatStringsSep " " cfg.directories} --db ${cacheDirectory}/db --thumbs ${cacheDirectory} --verbose"; + ExecStart = '' + ${pkgs.eth.dlnatoad}/bin/dlnatoad \ + ${concatStringsSep " " cfg.directories} \ + --db ${cacheDirectory}/db \ + --thumbs ${cacheDirectory} \ + ${if cfg.interface != "" then "--interface ${cfg.interface}" else ""} \ + --verbose + ''; NoNewPrivileges = true; ProtectHome = true; -- cgit v1.2.3