3
0
Fork 0
forked from mirrors/nixpkgs

minidlna: provide configuration option for announce interval

Signed-off-by: Markus S. Wamser <github-dev@mail2013.wamser.eu>
This commit is contained in:
Markus S. Wamser 2020-01-19 14:06:27 +01:00
parent 7db4b67267
commit d4718f180b

View file

@ -95,6 +95,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 =
@ -144,6 +160,7 @@ in
${concatMapStrings (dir: ''
media_dir=${dir}
'') cfg.mediaDirs}
notify_interval=${toString cfg.announceInterval}
${cfg.extraConfig}
'';