From f600d6a3b162322731da51b0ecec4ee55d765dc8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Fri, 30 Aug 2024 00:46:39 +0200 Subject: [PATCH] nixos/services.ympd: remove `with lib;` --- nixos/modules/services/audio/ympd.nix | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/audio/ympd.nix b/nixos/modules/services/audio/ympd.nix index ebbe59ca67c3..96977581a245 100644 --- a/nixos/modules/services/audio/ympd.nix +++ b/nixos/modules/services/audio/ympd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.ympd; in { @@ -12,26 +9,26 @@ in { services.ympd = { - enable = mkEnableOption "ympd, the MPD Web GUI"; + enable = lib.mkEnableOption "ympd, the MPD Web GUI"; - webPort = mkOption { - type = types.either types.str types.port; # string for backwards compat + webPort = lib.mkOption { + type = lib.types.either lib.types.str lib.types.port; # string for backwards compat default = "8080"; description = "The port where ympd's web interface will be available."; example = "ssl://8080:/path/to/ssl-private-key.pem"; }; mpd = { - host = mkOption { - type = types.str; + host = lib.mkOption { + type = lib.types.str; default = "localhost"; description = "The host where MPD is listening."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = config.services.mpd.network.port; - defaultText = literalExpression "config.services.mpd.network.port"; + defaultText = lib.literalExpression "config.services.mpd.network.port"; description = "The port where MPD is listening."; example = 6600; }; @@ -44,7 +41,7 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.ympd = { description = "Standalone MPD Web GUI written in C";