From b9b070ae8225cdcf148f9fb9b9c7a102dc1c6aaa Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 29 Dec 2024 21:50:35 +0100 Subject: [PATCH] nixos/services.manticore: remove `with lib;` --- nixos/modules/services/search/manticore.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/search/manticore.nix b/nixos/modules/services/search/manticore.nix index 76cb16bee0d1..e69c6d8c59f2 100644 --- a/nixos/modules/services/search/manticore.nix +++ b/nixos/modules/services/search/manticore.nix @@ -4,9 +4,6 @@ pkgs, ... }: - -with lib; - let cfg = config.services.manticore; @@ -14,7 +11,7 @@ let toSphinx = { - mkKeyValue ? generators.mkKeyValueDefault { } "=", + mkKeyValue ? lib.generators.mkKeyValueDefault { } "=", listsAsDuplicateKeys ? true, }: attrsOfAttrs: @@ -22,7 +19,7 @@ let # map function to string for each key val mapAttrsToStringsSep = sep: mapFn: attrs: - concatStringsSep sep (mapAttrsToList mapFn attrs); + lib.concatStringsSep sep (lib.mapAttrsToList mapFn attrs); mkSection = sectName: sectValues: '' @@ -46,9 +43,9 @@ in options = { services.manticore = { - enable = mkEnableOption "Manticoresearch"; + enable = lib.mkEnableOption "Manticoresearch"; - settings = mkOption { + settings = lib.mkOption { default = { searchd = { listen = [ @@ -67,10 +64,10 @@ in for more information. ''; - type = types.submodule { + type = lib.types.submodule { freeformType = format.type; }; - example = literalExpression '' + example = lib.literalExpression '' { searchd = { listen = [ @@ -90,7 +87,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd = { packages = [ pkgs.manticoresearch ];