From 0c2b6b57d92ffb62c9d9b9e462b92c71aaea46ba Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Mon, 7 Jul 2025 14:21:42 +0800 Subject: [PATCH] refactor(lib): remove references to top level lib --- nix/files/cheatsheet.nix | 3 ++- nix/flake-parts/files.nix | 2 +- nix/modules/machine/root/ephemeral.nix | 2 +- nix/modules/options/persist.nix | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nix/files/cheatsheet.nix b/nix/files/cheatsheet.nix index aba7f33..e307bbc 100644 --- a/nix/files/cheatsheet.nix +++ b/nix/files/cheatsheet.nix @@ -1,6 +1,7 @@ { lib, config, ... }: let - inherit (lib) concatStringsSep singleton; + inherit (builtins) concatStringsSep; + inherit (lib.lists) singleton; in { text.cheatsheet = concatStringsSep "\n" [ diff --git a/nix/flake-parts/files.nix b/nix/flake-parts/files.nix index eb3dd28..e210c52 100644 --- a/nix/flake-parts/files.nix +++ b/nix/flake-parts/files.nix @@ -7,7 +7,7 @@ }: let inherit (builtins) map head; - inherit (lib) concatStringsSep; + inherit (lib.lists) concatStringsSep; mkListEntry = x: "- [" + x.path_ + "](" + x.path_ + ")"; listOfGeneratedFiles = withSystem (head config.systems) (psArgs: psArgs.config.files.files); in diff --git a/nix/modules/machine/root/ephemeral.nix b/nix/modules/machine/root/ephemeral.nix index 04bc67c..729f1cc 100644 --- a/nix/modules/machine/root/ephemeral.nix +++ b/nix/modules/machine/root/ephemeral.nix @@ -1,6 +1,6 @@ { config, lib, ... }: let - inherit (lib) mkMerge mkIf mkAfter; + inherit (lib.modules) mkMerge mkIf mkAfter; in { flake.modules.nixos.default = diff --git a/nix/modules/options/persist.nix b/nix/modules/options/persist.nix index 2e2b81b..2ce1993 100644 --- a/nix/modules/options/persist.nix +++ b/nix/modules/options/persist.nix @@ -5,7 +5,7 @@ ... }: let - inherit (lib) mkOption; + inherit (lib.options) mkOption; inherit (config.flake.lib.options) mkStrOption; inherit (lib.types) listOf