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
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
golem-provider = ./golem-provider;
|
||||
heisenbridge = ./heisenbridge;
|
||||
iwd = ./iwd;
|
||||
importer = ./importer;
|
||||
localbackup = ./localbackup;
|
||||
localsend = ./localsend;
|
||||
matrix-synapse = ./matrix-synapse;
|
||||
|
||||
27
clanModules/importer/README.md
Normal file
27
clanModules/importer/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
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:
|
||||
|
||||
```nix
|
||||
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`.
|
||||
4
clanModules/importer/default.nix
Normal file
4
clanModules/importer/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
# Dont import this file
|
||||
# It is only here for backwards compatibility.
|
||||
# Dont author new modules with this file.
|
||||
{ }
|
||||
1
clanModules/importer/roles/default.nix
Normal file
1
clanModules/importer/roles/default.nix
Normal file
@@ -0,0 +1 @@
|
||||
{ }
|
||||
@@ -79,6 +79,7 @@ nav:
|
||||
- reference/clanModules/heisenbridge.md
|
||||
- reference/clanModules/index.md
|
||||
- reference/clanModules/iwd.md
|
||||
- reference/clanModules/importer.md
|
||||
- reference/clanModules/localbackup.md
|
||||
- reference/clanModules/localsend.md
|
||||
- reference/clanModules/machine-id.md
|
||||
|
||||
Reference in New Issue
Block a user