From dd7e20e16ae12ea45d7c1a9a3eacf5e818aabbd3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Aug 2024 20:42:48 +0200 Subject: [PATCH] nixos/environment.memoryAllocator: remove `with lib;` --- nixos/modules/config/malloc.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index e414970b0be5..665cbdd27874 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: -with lib; - let cfg = config.environment.memoryAllocator; @@ -85,12 +83,12 @@ in { meta = { - maintainers = [ maintainers.joachifm ]; + maintainers = [ lib.maintainers.joachifm ]; }; options = { - environment.memoryAllocator.provider = mkOption { - type = types.enum ([ "libc" ] ++ attrNames providers); + environment.memoryAllocator.provider = lib.mkOption { + type = lib.types.enum ([ "libc" ] ++ lib.attrNames providers); default = "libc"; description = '' The system-wide memory allocator. @@ -98,8 +96,8 @@ in Briefly, the system-wide memory allocator providers are: - `libc`: the standard allocator provided by libc - ${concatStringsSep "\n" (mapAttrsToList - (name: value: "- `${name}`: ${replaceStrings [ "\n" ] [ " " ] value.description}") + ${lib.concatStringsSep "\n" (lib.mapAttrsToList + (name: value: "- `${name}`: ${lib.replaceStrings [ "\n" ] [ " " ] value.description}") providers)} ::: {.warning} @@ -111,7 +109,7 @@ in }; }; - config = mkIf (cfg.provider != "libc") { + config = lib.mkIf (cfg.provider != "libc") { environment.etc."ld-nix.so.preload".text = '' ${providerLibPath} '';