mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
treewide: refactor custom lib, merge lists in hm/nixos module (#323)
* treewide: refactor custom lib, merge lists in hm/nixos module * lib/types(custom): clarify anythingConcatLists code --------- Co-authored-by: raf <raf@notashelf.dev>
This commit is contained in:
parent
0c444830f6
commit
901363d1ac
13 changed files with 307 additions and 256 deletions
|
@ -1,7 +1,7 @@
|
|||
inputs: {
|
||||
configuration,
|
||||
pkgs,
|
||||
lib ? pkgs.lib,
|
||||
lib,
|
||||
check ? true,
|
||||
extraSpecialArgs ? {},
|
||||
extraModules ? [],
|
||||
|
@ -15,23 +15,16 @@ inputs: {
|
|||
inherit (lib.attrsets) recursiveUpdate;
|
||||
inherit (lib.asserts) assertMsg;
|
||||
|
||||
# call the extedended library with `lib` and `inputs` as arguments
|
||||
# lib is used to provide the standard library functions to the extended library
|
||||
# but it can be overridden while this file is being called
|
||||
# inputs is used to pass inputs to the plugin autodiscovery function
|
||||
extendedLib = import ../lib/stdlib-extended.nix lib inputs;
|
||||
|
||||
# import modules.nix with `check`, `pkgs` and `lib` as arguments
|
||||
# check can be disabled while calling this file is called
|
||||
# to avoid checking in all modules
|
||||
nvimModules = import ./modules.nix {
|
||||
inherit pkgs check;
|
||||
lib = extendedLib;
|
||||
inherit pkgs check lib;
|
||||
};
|
||||
|
||||
# evaluate the extended library with the modules
|
||||
# optionally with any additional modules passed by the user
|
||||
module = extendedLib.evalModules {
|
||||
module = lib.evalModules {
|
||||
specialArgs = recursiveUpdate {modulesPath = toString ./.;} extraSpecialArgs;
|
||||
modules = concatLists [[configuration] nvimModules extraModules];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue