Unverified Commit 92f2492c authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

nixos/mpd: fix warning evaluation of bind_to_address (#471284)

parents ea33e7f9 a045ccb7
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -371,13 +371,16 @@ in
    warnings =
      lib.optional
        (
          !(builtins.elem cfg.bind_to_address [
          !(
            (builtins.elem cfg.settings.bind_to_address [
              "localhost"
              "127.0.0.1"
            ])
            || (lib.hasPrefix "/" cfg.settings.bind_to_address)
          )
          && !cfg.openFirewall
        )
        "Using '${cfg.bind_to_address}' as services.mpd.settings.bind_to_address without enabling services.mpd.openFirewall, might prevent you from accessing MPD from other clients.";
        "Using '${cfg.settings.bind_to_address}' as services.mpd.settings.bind_to_address without enabling services.mpd.openFirewall, might prevent you from accessing MPD from other clients.";

    # install mpd units
    systemd.packages = [ pkgs.mpd ];