commit dd8adcf92017340a78d3af26b917be3dbbebe4ed parent bde262500c676bda096775c8e737d9ff7d53c604 Author: mtmn <miro@haravara.org> Date: Wed, 1 Jul 2026 14:20:55 +0200 fix listenbrainz-mpd Diffstat:
| M | hosts/nixaran/configuration.nix | | | 0 | |
| M | hosts/void/overlays/config/shell/rc/void | | | 0 | |
| M | modules/services/listenbrainz-mpd.nix | | | 18 | ++++++++++-------- |
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/hosts/nixaran/configuration.nix b/hosts/nixaran/configuration.nix Binary files differ. diff --git a/hosts/void/overlays/config/shell/rc/void b/hosts/void/overlays/config/shell/rc/void Binary files differ. diff --git a/modules/services/listenbrainz-mpd.nix b/modules/services/listenbrainz-mpd.nix @@ -5,15 +5,17 @@ ... }: let cfg = config.services.haravara.listenbrainz-mpd; - configFile = pkgs.writeText "listenbrainz-mpd.toml" '' - [submission] - api_url = "${cfg.apiUrl}" - genres_as_folksonomy = ${lib.boolToString cfg.genresAsFolksonomy} + configFile = pkgs.writeText "listenbrainz-mpd.toml" ('' + [submission] + api_url = "${cfg.apiUrl}" + genres_as_folksonomy = ${lib.boolToString cfg.genresAsFolksonomy} - [mpd] - address = "${cfg.mpdAddress}" - password = "${cfg.mpdPassword}" - ''; + [mpd] + address = "${cfg.mpdAddress}" + '' + + lib.optionalString (cfg.mpdPassword != "") '' + password = "${cfg.mpdPassword}" + ''); in { options.services.haravara.listenbrainz-mpd = { enable = lib.mkEnableOption "ListenBrainz MPD client";