Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Releases: cig0/nix-modulon

v0.2.0: Documentation and efficiency improvements

Choose a tag to compare

@cig0 cig0 released this 07 Mar 06:09
v0.2.0
ddbdba8

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

Choose a tag to compare

@cig0 cig0 released this 05 May 02:32
v0.1.1
4c21d55

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

Choose a tag to compare

@cig0 cig0 released this 27 Apr 16:11
v0.1.0
559987b

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 .nix files 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:

  1. Add the input to your flake.nix:
    inputs.dynamic-module-importer.url = "github:cig0/modulon/v0.1.0";
  2. Call the library function in your modules list:
    let modulon = modulon.lib.${system};
    in {
      # ...
      modules = [
        # ... other modules
        (modulon { dirs = [ ./modules ]; })
      ];
      # ...
    }

Notes:

  • Please refer to the README.md for 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.0 release.

Feedback and contributions are welcome!