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 ++++++++++++++- pkgs/dlnatoad/default.nix | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) 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; diff --git a/pkgs/dlnatoad/default.nix b/pkgs/dlnatoad/default.nix index 7388ed0..ac2398d 100644 --- a/pkgs/dlnatoad/default.nix +++ b/pkgs/dlnatoad/default.nix @@ -11,8 +11,8 @@ in stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "haku"; repo = "dlnatoad"; - rev = "837e801b8da5726f25e73a4fd70c991eccc942c5"; - sha256 = "060360q4n3li773rviq8ab1931l0gfk5w9dqpc0711prng5ywqy4"; + rev = "e01cd15a133a44ac068ba39f09bbe989e29b7650"; + sha256 = "0qwvwvyb03hxnxg3zx7s9bb7sdm0hspbcqhdy4mk6bgjqnzj7d8d"; }; buildInputs = [ -- cgit v1.2.3