diff options
author | Ethel Morgan <eth@ethulhu.co.uk> | 2020-07-14 00:10:45 +0100 |
---|---|---|
committer | Ethel Morgan <eth@ethulhu.co.uk> | 2020-07-14 00:10:45 +0100 |
commit | c55bee059fced324b9f6ac6cef476dea7d71d958 (patch) | |
tree | 42eec30f0df94d1862a260bd0262aebc07117361 /nixos/modules/services/dlnatoad.nix | |
parent | 8a30ff48e1b16d5ba70ae5b1ae402c062967a6dd (diff) |
update dlnatoad; add dlnatoad.interfaces config option
Diffstat (limited to 'nixos/modules/services/dlnatoad.nix')
-rw-r--r-- | nixos/modules/services/dlnatoad.nix | 15 |
1 files changed, 14 insertions, 1 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; |