summaryrefslogtreecommitdiff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorEthel Morgan <eth@ethulhu.co.uk>2020-07-14 00:10:45 +0100
committerEthel Morgan <eth@ethulhu.co.uk>2020-07-14 00:10:45 +0100
commitc55bee059fced324b9f6ac6cef476dea7d71d958 (patch)
tree42eec30f0df94d1862a260bd0262aebc07117361 /nixos/modules/services
parent8a30ff48e1b16d5ba70ae5b1ae402c062967a6dd (diff)
update dlnatoad; add dlnatoad.interfaces config option
Diffstat (limited to '')
-rw-r--r--nixos/modules/services/dlnatoad.nix15
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;