From c8047f7b83b63de0194e3dc3d4228d387017d2bc Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 29 Oct 2025 17:14:26 +0200 Subject: [PATCH] nixos/mpd: always set all options explicitly --- nixos/modules/services/audio/mpd.nix | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index 2f1012ae3d85..692e52f6788d 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -31,16 +31,12 @@ let music_directory "${cfg.music_directory}" playlist_directory "${cfg.playlist_directory}" - ${lib.optionalString (cfg.db_file != null) '' - db_file "${cfg.db_file}" - ''} + db_file "${cfg.db_file}" state_file "${cfg.dataDir}/state" sticker_file "${cfg.dataDir}/sticker.sql" - ${lib.optionalString ( - cfg.bind_to_address != "any" - ) ''bind_to_address "${cfg.bind_to_address}"''} - ${lib.optionalString (cfg.port != 6600) ''port "${toString cfg.port}"''} + bind_to_address "${cfg.bind_to_address}" + port "${toString cfg.port}" ${lib.optionalString (cfg.fluidsynth) '' decoder { plugin "fluidsynth" @@ -158,12 +154,11 @@ in }; db_file = lib.mkOption { - type = lib.types.nullOr lib.types.path; + type = lib.types.path; default = "${cfg.dataDir}/tag_cache"; defaultText = lib.literalExpression ''"''${dataDir}/tag_cache"''; description = '' - The path to MPD's database. If set to `null` the - parameter is omitted from the configuration. + The path to MPD's database. ''; };