1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00

eval-config: make lib overridable

This enables using flake lib.darwinSystem function with your custom
lib.
This commit is contained in:
zimbatm 2022-09-06 20:55:00 +02:00 committed by Brian McGee
parent 14a12e9ee7
commit 74a0e71ff2
No known key found for this signature in database
GPG key ID: D708AB8298D76283

View file

@ -1,7 +1,11 @@
{ lib }: { lib }:
let
nixpkgs-lib = lib;
in
{ system ? builtins.currentSystem or "x86_64-darwin" { system ? builtins.currentSystem or "x86_64-darwin"
, pkgs ? null , pkgs ? null
, lib ? nixpkgs-lib
, modules , modules
, inputs , inputs
, baseModules ? import ./modules/module-list.nix , baseModules ? import ./modules/module-list.nix
@ -44,7 +48,7 @@ let
literalDocBook = super.literalDocBook or super.literalExample; literalDocBook = super.literalDocBook or super.literalExample;
}); });
eval = libExtended.evalModules (builtins.removeAttrs args [ "inputs" "pkgs" "system" ] // { eval = libExtended.evalModules (builtins.removeAttrs args [ "lib" "inputs" "pkgs" "system" ] // {
modules = modules ++ [ argsModule pkgsModule ] ++ baseModules; modules = modules ++ [ argsModule pkgsModule ] ++ baseModules;
specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs; specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs;
}); });