Merge pull request 'clanModules/importer: Init importer inventory module' (#2440) from kenji/clan-core:kenji-clan-modules/importer into main
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
golem-provider = ./golem-provider;
|
golem-provider = ./golem-provider;
|
||||||
heisenbridge = ./heisenbridge;
|
heisenbridge = ./heisenbridge;
|
||||||
iwd = ./iwd;
|
iwd = ./iwd;
|
||||||
|
importer = ./importer;
|
||||||
localbackup = ./localbackup;
|
localbackup = ./localbackup;
|
||||||
localsend = ./localsend;
|
localsend = ./localsend;
|
||||||
matrix-synapse = ./matrix-synapse;
|
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/heisenbridge.md
|
||||||
- reference/clanModules/index.md
|
- reference/clanModules/index.md
|
||||||
- reference/clanModules/iwd.md
|
- reference/clanModules/iwd.md
|
||||||
|
- reference/clanModules/importer.md
|
||||||
- reference/clanModules/localbackup.md
|
- reference/clanModules/localbackup.md
|
||||||
- reference/clanModules/localsend.md
|
- reference/clanModules/localsend.md
|
||||||
- reference/clanModules/machine-id.md
|
- reference/clanModules/machine-id.md
|
||||||
|
|||||||
Reference in New Issue
Block a user