Introduction to Denix Modules
A Denix module is the same as a NixOS or Home Manager module, but its attribute set is wrapped in the delib.module
function.
No Limitations
This means that you can use all three types of modules simultaneously, although it's unlikely you'll need anything other than the first option:
Denix Module
nix
{delib, ...}:
delib.module {
name = "...";
}
Denix Module with NixOS/Home Manager Module
nix
{delib, ...}:
delib.module {
name = "...";
} // {
}
NixOS/Home Manager Module Only
nix
{
}
Simplicity and Cleanliness
Denix modules tend to look simpler and cleaner compared to NixOS/Home Manager modules, due to the following reasons:
- Simple yet fully functional option declaration (see Options).
- Built-in logic for separating configurations based on the value of
${delib.module :: name}.enable
: always, ifEnabled, ifDisabled. - Shared options but separated configurations for NixOS, Home Manager, and custom options.