flake: overlay lib

fix lib overlay
sh-initrd-on-root
Zynh Ludwig 2024-08-19 06:21:38 -07:00
parent 4ff0914d1a
commit e81e16168a
3 changed files with 10 additions and 9 deletions

View File

@ -1,8 +1,6 @@
{ nixpkgs, self, ... }@inputs: { nixpkgs, self, ... }@inputs:
let let
lib = nixpkgs.lib.extend (import ../lib);
makePkgs = system: (import nixpkgs { makePkgs = system: (import nixpkgs {
inherit system; inherit system;
@ -10,8 +8,10 @@ let
overlays = [ self.overlays.default ]; overlays = [ self.overlays.default ];
}); });
lib = nixpkgs.lib;
inherit (inputs.home-manager.lib) homeManagerConfiguration; inherit (inputs.home-manager.lib) homeManagerConfiguration;
inherit (nixpkgs.lib) nixosSystem; inherit (lib) nixosSystem;
inherit (lib.strings) optionalString; inherit (lib.strings) optionalString;
inherit (lib.attrsets) nameValuePair; inherit (lib.attrsets) nameValuePair;
in in
@ -22,7 +22,7 @@ rec {
hostname hostname
(nixosSystem { (nixosSystem {
pkgs = makePkgs system; pkgs = makePkgs system;
specialArgs = { inherit inputs lib self; }; specialArgs = { inherit inputs self; };
modules = [ modules = [
../hosts/${hostname}/hardware-configuration.nix ../hosts/${hostname}/hardware-configuration.nix
@ -48,10 +48,7 @@ rec {
"${user}${hostStr}" "${user}${hostStr}"
(homeManagerConfiguration { (homeManagerConfiguration {
pkgs = makePkgs system; pkgs = makePkgs system;
extraSpecialArgs = { extraSpecialArgs = { inherit inputs self; };
inherit inputs self;
lib = lib.extend (_: _: inputs.home-manager.lib);
};
modules = [ modules = [
../hosts/${configHost}/home.nix ../hosts/${configHost}/home.nix

View File

@ -1,5 +1,7 @@
final: prev: final: prev:
with prev; let
inherit (prev) isFunction;
in
rec { rec {
# Ternary operator # Ternary operator
# Exaample: # Exaample:

View File

@ -3,6 +3,8 @@ let
callDefaultPackage = path: prev.callPackage path { }; callDefaultPackage = path: prev.callPackage path { };
in in
{ {
lib = prev.lib.extend (import ../lib);
wrapWine = callDefaultPackage ./wrapWine; wrapWine = callDefaultPackage ./wrapWine;
writeXrandrScriptBin = callDefaultPackage ./writeXrandrScriptBin; writeXrandrScriptBin = callDefaultPackage ./writeXrandrScriptBin;
borderlessBrowser = callDefaultPackage ./borderlessBrowser; borderlessBrowser = callDefaultPackage ./borderlessBrowser;