From 587b451bcfb11836261a12508f052d9f687bf51b Mon Sep 17 00:00:00 2001 From: "Markus S. Wamser" Date: Sun, 19 Jan 2020 14:06:27 +0100 Subject: [PATCH] minidlna: provide configuration option for announce interval Signed-off-by: Markus S. Wamser --- nixos/modules/services/networking/minidlna.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nixos/modules/services/networking/minidlna.nix b/nixos/modules/services/networking/minidlna.nix index 0947471adbc9..4f3f9d24d091 100644 --- a/nixos/modules/services/networking/minidlna.nix +++ b/nixos/modules/services/networking/minidlna.nix @@ -64,6 +64,22 @@ in ''; }; + services.minidlna.announceInterval = mkOption { + type = types.int; + default = 895; + description = + '' + The interval between announces (in seconds). + + By default miniDLNA will announce its presence on the network + approximately every 15 minutes. + + Many people prefer shorter announce intervals (e.g. 60 seconds) + on their home networks, especially when DLNA clients are + started on demand. + ''; + }; + services.minidlna.config = mkOption { type = types.lines; description = "The contents of MiniDLNA's configuration file."; @@ -82,6 +98,7 @@ in ${concatMapStrings (dir: '' media_dir=${dir} '') cfg.mediaDirs} + notify_interval=${toString cfg.announceInterval} ''; users.users.minidlna = {