diff options
Diffstat (limited to 'nixos/modules/services/audio/mpdscribble.nix')
-rw-r--r-- | nixos/modules/services/audio/mpdscribble.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/services/audio/mpdscribble.nix b/nixos/modules/services/audio/mpdscribble.nix index 1368543ae1a4a..333ffb709410a 100644 --- a/nixos/modules/services/audio/mpdscribble.nix +++ b/nixos/modules/services/audio/mpdscribble.nix @@ -1,10 +1,11 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.services.mpdscribble; mpdCfg = config.services.mpd; + mpdOpt = options.services.mpd; endpointUrls = { "last.fm" = "http://post.audioscrobbler.com"; @@ -108,6 +109,11 @@ in { mpdCfg.network.listenAddress else "localhost"); + defaultText = literalExpression '' + if config.${mpdOpt.network.listenAddress} != "any" + then config.${mpdOpt.network.listenAddress} + else "localhost" + ''; type = types.str; description = '' Host for the mpdscribble daemon to search for a mpd daemon on. @@ -122,6 +128,10 @@ in { mpdCfg.credentials).passwordFile else null; + defaultText = literalDocBook '' + The first password file with read access configured for MPD when using a local instance, + otherwise <literal>null</literal>. + ''; type = types.nullOr types.str; description = '' File containing the password for the mpd daemon. @@ -132,6 +142,7 @@ in { port = mkOption { default = mpdCfg.network.port; + defaultText = literalExpression "config.${mpdOpt.network.port}"; type = types.port; description = '' Port for the mpdscribble daemon to search for a mpd daemon on. |