Files
clan-core/clanModules/importer
a-kenji 4b4b3826c8 clanModules/importer: Init importer inventory module
Initialize the `importer` inventory module.
It is a power user module that allows for convenient, flexible,
structured imports for hosts.

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

Closes: #2356
2024-11-19 14:00:57 +01: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.