mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 07:28:56 +08:00
fix
This commit is contained in:
parent
b77cb6414d
commit
e3f5704afc
@ -9,17 +9,16 @@ lib:
|
||||
# inputs: { environment.systemPackages = [ pkgs.hello ]; }
|
||||
# The second one would failed to evaluate because nixpkgs would not pass pkgs to it.
|
||||
# So that we wrote a wrapper to make it always works like the first one.
|
||||
mkModules = moduleList: { pkgs, ... }@inputs:
|
||||
{
|
||||
imports = builtins.map
|
||||
(
|
||||
let handle = module:
|
||||
if ( builtins.typeOf module ) == "path" then handle import module
|
||||
else if ( builtins.typeOf module ) == "lambda" then module inputs
|
||||
else module;
|
||||
in handle
|
||||
) moduleList;
|
||||
};
|
||||
mkModules = moduleList:
|
||||
(builtins.map
|
||||
(
|
||||
let handle = module:
|
||||
if ( builtins.typeOf module ) == "path" then (handle (import module))
|
||||
else if ( builtins.typeOf module ) == "lambda" then ({ pkgs, utils, ... }@inputs: (module inputs))
|
||||
else module;
|
||||
in handle
|
||||
)
|
||||
moduleList);
|
||||
|
||||
# from: https://github.com/NixOS/nix/issues/3759
|
||||
stripeTabs = text:
|
||||
|
Loading…
Reference in New Issue
Block a user