summaryrefslogtreecommitdiff
path: root/nixos/modules
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules')
-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;