git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #78024 from wamserma/minidlna-interval

minidlna: provide configuration option for announce interval

commit6169eef798826eabc3d8b3205d5723ad74942d2b authorSilvan Mosberger <contact@infinisil.com> dateMon 10 Feb 2020, 01:25 (7 years ago) parentb9d7f1fd4718f1
1 file changed+17
nixos/modules/services/networking/minidlna.nix+17
nixos/modules/services/networking/minidlna.nix+17
@@ -95,6 +95,22 @@ in
9595 '';
9696 };
9797
98+ services.minidlna.announceInterval = mkOption {
99+ type = types.int;
100+ default = 895;
101+ description =
102+ ''
103+ The interval between announces (in seconds).
104+
105+ By default miniDLNA will announce its presence on the network
106+ approximately every 15 minutes.
107+
108+ Many people prefer shorter announce intervals (e.g. 60 seconds)
109+ on their home networks, especially when DLNA clients are
110+ started on demand.
111+ '';
112+ };
113+
98114 services.minidlna.config = mkOption {
99115 type = types.lines;
100116 description =
@@ -144,6 +160,7 @@ in
144160 ${concatMapStrings (dir: ''
145161 media_dir=${dir}
146162 '') cfg.mediaDirs}
163+ notify_interval=${toString cfg.announceInterval}
147164 ${cfg.extraConfig}
148165 '';
149166