Regenerated
This commit is contained in:
@@ -131,6 +131,46 @@ The Nix flake definition for Droidnix.
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =debug-modules.nix=
|
||||
The Nix flake definition for Droidnix.
|
||||
#+BEGIN_SRC nix :tangle debug-modules.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ lib, inputs }:
|
||||
|
||||
let
|
||||
modulesPath = ./generated/parked;
|
||||
importedModules = inputs.import-tree modulesPath;
|
||||
moduleSwitches = import ./assets/system/modules.conf;
|
||||
|
||||
enabledModules =
|
||||
lib.filterAttrs (name: _: moduleSwitches.${name} or false)
|
||||
importedModules.imports;
|
||||
|
||||
moduleList = builtins.attrValues enabledModules;
|
||||
|
||||
debugFragment = module:
|
||||
let
|
||||
frag =
|
||||
if builtins.hasAttr "homeManagerExtraUserFragment" module
|
||||
then module.homeManagerExtraUserFragment
|
||||
else {};
|
||||
evaluated =
|
||||
if builtins.isFunction frag then frag {} else frag;
|
||||
isAttrs = builtins.isAttrs evaluated;
|
||||
isList = builtins.isList evaluated;
|
||||
isThunk = builtins.isFunction frag;
|
||||
in
|
||||
{
|
||||
name = if builtins.hasAttr "name" module then module.name else "unknown";
|
||||
isAttrs = isAttrs;
|
||||
isList = isList;
|
||||
isThunk = isThunk;
|
||||
};
|
||||
|
||||
debugList = map debugFragment moduleList;
|
||||
in
|
||||
debugList
|
||||
#+END_SRC
|
||||
|
||||
|
||||
* Let's define the core of the system
|
||||
|
||||
|
||||
Reference in New Issue
Block a user