Releases: cig0/nix-modulon
Release list
v0.2.0: Documentation and efficiency improvements
v0.2.0: Documentation and efficiency improvements
- Refactor module collection with semantic split of exclusions
- Add graceful directory handling with clear error messages
- Require 2+ pattern matches to reduce false positives
- Clarify excludePaths infix matching behavior
- Split README into focused docs directory with mermaid diagram
- Fix typo in flake.nix
Breaking changes:
- Module detection now requires 2+ patterns (may exclude some edge-case modules)
- Improved error messages for non-existent directories
v0.1.1
Until now, the only way to skip modules was by adding them to the excludePaths list. With this tag checker, you can now easily tell Modulon to skip specific modules without needing to modify the exclusion list. :)
This is especially useful when you have a module structure like this:
.
├── ...
├── packages
│ ├── baseline.nix
│ ├── cli.nix
│ ├── default.nix
│ ├── gui.nix
│ └── tryout.nix
├── ...
└── ...Without this new functionality, you'd need to do something like this in your flake:
# Dynamically import NixOS modules
(libModulon {
...
excludePaths = [
"/applications/packages/"
];
extraModules = [
"${self}/configs/nixos/modules/applications/packages/default.nix"
];
})Just add @MODULON_SKIP somewhere in your module (I recommend adding it at the top), and you're good to go!
v0.1.0
Modulon v0.1.0
This is the first usable release of the Modulon flake.
It aims to simplify NixOS and Home Manager configuration management by automatically discovering and importing your flake's modules.
Key Features:
- Content-Based Discovery: Scans
.nixfiles in specified directories (dirs) and identifies potential modules by looking for common patterns (config,,lib,,options.,}:, etc.). - Library Function: Provides the core functionality via
self.lib.<system>. - Flexible Configuration: Allows excluding specific paths or patterns (
excludePaths) and manually including specific files (extraModules). - Included Tooling: Comes with basic checks (
nix flake check), a development shell (nix develop), and a formatter (nix fmt).
Basic Usage:
- Add the input to your
flake.nix:inputs.dynamic-module-importer.url = "github:cig0/modulon/v0.1.0";
- Call the library function in your
moduleslist:let modulon = modulon.lib.${system}; in { # ... modules = [ # ... other modules (modulon { dirs = [ ./modules ]; }) ]; # ... }
Notes:
- Please refer to the
README.mdfor detailed configuration options and examples. - As per Semantic Versioning for major version zero, this library is usable but should not be considered fully stable. Breaking changes may occur before a
v1.0.0release.
Feedback and contributions are welcome!