nixos/minidlna: update documentation

This commit is contained in:
bb2020 2022-08-02 00:26:23 +03:00 committed by Alyssa Ross
parent 88441f3e44
commit ce609256fb

View file

@ -1,6 +1,5 @@
# Module for MiniDLNA, a simple DLNA server.
{ config, lib, pkgs, ... }:
with lib;
let
@ -34,8 +33,7 @@ in
default = {};
description = lib.mdDoc ''
The contents of MiniDLNA's configuration file.
When the service is activated, a basic template is generated
from the current options opened here.
When the service is activated, a basic template is generated from the current options opened here.
'';
type = types.submodule {
freeformType = settingsFormat.type;
@ -46,10 +44,8 @@ in
example = [ "/data/media" "V,/home/alice/video" ];
description = lib.mdDoc ''
Directories to be scanned for media files.
The prefixes `A,`,`V,` and
`P,` restrict a directory to audio, video
or image files. The directories must be accessible to the
`minidlna` user account.
The `A,` `V,` `P,` prefixes restrict a directory to audio, video or image files.
The directories must be accessible to the `minidlna` user account.
'';
};
options.notify_interval = mkOption {
@ -57,18 +53,11 @@ in
default = 90000;
description = lib.mdDoc ''
The interval between announces (in seconds).
Instead of waiting on announces, one can open port UDP 1900 or
set `openFirewall` option to use SSDP discovery.
Furthermore announce interval has now been set as 90000 in order
to prevent disconnects with certain clients and to rely solely
on the SSDP method.
Lower values (e.g. 60 seconds) should be used if one does not
want to utilize SSDP. By default miniDLNA will announce its
presence on the network approximately every 15 minutes. Many
people prefer shorter announce intervals on their home networks,
especially when DLNA clients are started on demand.
Instead of waiting for announces, you should set `openFirewall` option to use SSDP discovery.
Furthermore, this option has been set to 90000 in order to prevent disconnects with certain
clients and relies solely on the discovery.
Lower values (e.g. 30 seconds) should be used if you can't use the discovery.
Some relevant information can be found here:
https://sourceforge.net/p/minidlna/discussion/879957/thread/1389d197/
'';
@ -86,7 +75,7 @@ in
};
options.friendly_name = mkOption {
type = types.str;
default = "${config.networking.hostName} MiniDLNA";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
example = "rpi3";
description = lib.mdDoc "Name that the DLNA server presents to clients.";
@ -116,7 +105,7 @@ in
options.wide_links = mkOption {
type = types.enum [ "yes" "no" ];
default = "no";
description = lib.mdDoc "Set this to yes to allow symlinks that point outside user-defined media_dirs.";
description = lib.mdDoc "Set this to yes to allow symlinks that point outside user-defined `media_dir`.";
};
};
};