Apparently `../modules` is creating a separate derivation that contains only that folder, so it's now separate from the flake source. But this transient derivation isn't mentioned explicitly anywhere in the flake outputs. It makes it impossible to target those modules in `disabledModules` directive. For example, after this change is applied, users can solve issues like https://github.com/danth/stylix/issues/577 locally, by just adding the following snippet to their configuration: disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ]; Reviewed-by: Daniel Thwaites <danthwaites30@btinternet.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
14 lines
418 B
Nix
14 lines
418 B
Nix
{ lib, inputs }:
|
|
|
|
# string -> [ path ]
|
|
# List include path for either nixos modules or hm modules
|
|
for:
|
|
builtins.concatLists
|
|
(lib.mapAttrsToList
|
|
(path: kind:
|
|
if kind == "directory"
|
|
then let
|
|
file = "${inputs.self}/modules/${path}/${for}.nix";
|
|
in if builtins.pathExists file then [ file ] else [ ]
|
|
else [ ])
|
|
(builtins.readDir "${inputs.self}/modules"))
|