Add Inventory and Host Generation
49
Inventory-and-Host-Generation.md
Normal file
49
Inventory-and-Host-Generation.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Inventory & Host Generation
|
||||
|
||||
All hosts are defined in `inventory.nix`.
|
||||
|
||||
Top-level keys are hostname prefixes.
|
||||
Actual hostnames are generated from device definitions.
|
||||
|
||||
## Example
|
||||
|
||||
```nix
|
||||
nix-laptop = {
|
||||
devices = 3;
|
||||
};
|
||||
```
|
||||
|
||||
Produces:
|
||||
|
||||
- nix-laptop1
|
||||
- nix-laptop2
|
||||
- nix-laptop3
|
||||
|
||||
## Hostname Rules
|
||||
|
||||
- Numeric suffix → no dash
|
||||
- String suffix → dash added
|
||||
- Disable prefix:
|
||||
|
||||
```nix
|
||||
athenix.host.useHostPrefix = false;
|
||||
```
|
||||
|
||||
## Overrides
|
||||
|
||||
Apply configuration to all devices:
|
||||
|
||||
```nix
|
||||
overrides = {
|
||||
athenix.users.student.enable = true;
|
||||
};
|
||||
```
|
||||
|
||||
## Per-Device Configuration
|
||||
|
||||
```nix
|
||||
devices = {
|
||||
"1".athenix.sw.kioskUrl = "https://dash1";
|
||||
"admin".athenix.sw.type = "desktop";
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user