flake: overlay lib

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

View file

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

View file

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