Files
clan-core/clanModules/importer
hsjobeki 341f444fa0 revert bd3861c580
revert Merge pull request 'Remove clanModules/*' (#4202) from remove-modules into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4202

See: https://git.clan.lol/clan/clan-core/issues/4365

Not all modules are migrated.
If they are not migrated, we need to write migration docs and please display the link to the migration docs
2025-07-15 17:51:36 +00:00
..
2025-07-15 17:51:36 +00:00
2025-07-07 13:54:26 +10:00

description = "Convenient, structured module imports for hosts." categories = ["Utility"] features = [ "inventory" ]

The importer module allows users to configure importing modules in a flexible and structured way.

It exposes the extraModules functionality of the inventory, without any added configuration.

Usage

inventory.services = {
  importer.base = {
    roles.default.tags = [ "all" ];
    roles.default.extraModules = [ "modules/base.nix" ];
  };
  importer.zone1 = {
    roles.default.tags = [ "zone1" ];
    roles.default.extraModules = [ "modules/zone1.nix" ];
  };
};

This will import the module modules/base.nix to all machines that have the all tag, which by default is every machine managed by the clan. And also import for all machines tagged with zone1 the module at modules/zone1.nix.