From fa00ab3f0e959c2b4cca4bfe42ab923fb68db86b Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Mon, 19 Dec 2022 23:55:11 -0500 Subject: [PATCH] inherit nixpkgs.lib --- flake.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index a9731d3..b014866 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ outputs = { self, nixpkgs, impermanence, ... }: let + inherit (nixpkgs) lib; mypkgs = pkgs: let @@ -13,14 +14,14 @@ in if p.meta.available then p else pkgs.emptyDirectory; in - (nixpkgs.lib.mapAttrs' + (lib.mapAttrs' (name: type: { - name = nixpkgs.lib.removeSuffix ".nix" name; + name = lib.removeSuffix ".nix" name; value = pkg (./pkgs + "/${name}"); }) (builtins.readDir ./pkgs)); - forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" ]; + forAllSystems = lib.genAttrs [ "x86_64-linux" ]; pins = { nix.registry.nixpkgs.to = { @@ -42,9 +43,9 @@ inherit (impermanence.nixosModules) impermanence; pkgs.nixpkgs.overlays = [ (_: mypkgs) ]; } // - nixpkgs.lib.mapAttrs' + lib.mapAttrs' (name: type: { - name = nixpkgs.lib.removeSuffix ".nix" name; + name = lib.removeSuffix ".nix" name; value = import (./modules + "/${name}"); }) (builtins.readDir ./modules); @@ -59,7 +60,7 @@ nixosModules = mods // { default.imports = builtins.attrValues mods; }; nixosConfigurations = builtins.mapAttrs - (_: nixpkgs.lib.nixosSystem) + (_: lib.nixosSystem) (import ./hosts self.nixosModules.default); apps = forAllSystems (system: