Adds the flakeModules attribute and flakeModule alias.

This module makes deduplication and disabledModules work, even if the definitions are inline modules or importApply.


To use these options, add inside the mkFlake:

imports = [

Run nix flake lock and you're set.



Raw flake output attributes. Any attribute can be set here, but some attributes are represented by options, to provide appropriate configuration merging.

Type: lazy attribute set of raw value

Declared by:


Alias of flakeModules.default.

Type: submodule

Declared by:


flake-parts modules for use by other flakes.

If the flake defines only one module, it should be flakeModules.default.

You can not read this option in defining the flakeā€™s own imports. Instead, you can put the module in question into its own file or let binding and reference it both in imports and export it with this option.

See Dogfood a Reusable Module for details and an example.

Type: lazy attribute set of module

Default: { }

Declared by: