From ed344f1d2a05bc9dde22fa87abeffedd36a63527 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 29 Dec 2024 21:50:36 +0100 Subject: [PATCH] nixos/services.quickwit: remove `with lib;` --- nixos/modules/services/search/quickwit.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/search/quickwit.nix b/nixos/modules/services/search/quickwit.nix index c55b32154b53..c8b1c1c516e9 100644 --- a/nixos/modules/services/search/quickwit.nix +++ b/nixos/modules/services/search/quickwit.nix @@ -4,9 +4,6 @@ pkgs, ... }: - -with lib; - let cfg = config.services.quickwit; @@ -19,7 +16,7 @@ in { options.services.quickwit = { - enable = mkEnableOption "Quickwit"; + enable = lib.mkEnableOption "Quickwit"; package = lib.mkPackageOption pkgs "Quickwit" { default = [ "quickwit" ]; @@ -83,7 +80,7 @@ in dataDir = lib.mkOption { type = lib.types.path; default = "/var/lib/quickwit"; - apply = converge (removeSuffix "/"); + apply = lib.converge (lib.removeSuffix "/"); description = '' Data directory for Quickwit. If you change this, you need to manually create the directory. You also need to create the @@ -130,7 +127,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.quickwit = { description = "Quickwit"; wantedBy = [ "multi-user.target" ]; @@ -143,7 +140,7 @@ in { ExecStart = '' ${cfg.package}/bin/quickwit run --config ${quickwitYml} \ - ${escapeShellArgs cfg.extraFlags} + ${lib.escapeShellArgs cfg.extraFlags} ''; User = cfg.user; Group = cfg.group; @@ -186,7 +183,7 @@ in "@chown" ]; } - // (optionalAttrs (usingDefaultDataDir) { + // (lib.optionalAttrs (usingDefaultDataDir) { StateDirectory = "quickwit"; StateDirectoryMode = "0700"; });