add architecture-docs/NixDefinitions.md

This commit is contained in:
Taeer Bar-Yam 2024-06-20 09:52:17 -04:00
parent a0d0b16b13
commit 03bf4d8272
2 changed files with 21 additions and 4 deletions

View file

@ -0,0 +1,15 @@
# NixConfigs
NixConfigs is a thin layer of configuration options that distinguishes a particular Fediversity deployment from any other. It can be thought of as the API between NixPanel and NixDefinitions.
## Where it's situated
![](./architecture.png)
### [NixPanel](./NixPanel.md)
NixPanel produces the NixConfig based on options set by Administrators.
### [NixDefinitions](./NixDefinitions.md)
NixDefinitions defines what options are included in NixConfigs, and uses them to produce a description of the system that should run.

View file

@ -1,12 +1,14 @@
# NixDefinitions # NixDefinitions
NixDefinitions is a layer of NixOS modules that exposes a simple interface of a few options (e.g. what services to run, domain names), and turns that into a full description of all the systems that need to be running.
## Where it's situated ## Where it's situated
![](./architecture.png) ![](./architecture.png)
### [NixConfigs](./NixConfigs.md) ### [NixConfigs](./NixConfigs.md)
NixDefinitions is a layer of NixOS modules that exposes a simple interface of a few options (e.g. what services to run, domain names). Setting those options is the job of the layer above (NixConfigs). NixConfigs sets the few options exposed by NixDefinitions.
### [NixOS Instances](./NixOS_Instances.md) & [Services](./Services.md) ### [NixOS Instances](./NixOS_Instances.md) & [Services](./Services.md)
@ -14,14 +16,14 @@ The combination of NixConfigs and NixDefintions produces a detailed description
### [NixOps](./NixOps.md) ### [NixOps](./NixOps.md)
NixOps consumes the combined NixConfigs/NixDefintions configuration to know what the system should look like when deployed. NixOps consumes the combined NixConfigs/NixDefintions system description to know what the system should look like when deployed.
### [NixGuard](./NixGuard.md) ### [NixGuard](./NixGuard.md)
NixGuard compares the state of the NixConfigs/NixDefinitions to the running state to detect inconsistent state and either fix or report it. NixGuard compares the state of NixConfigs/NixDefinitions to the running state to detect inconsistent state and either fix or report it.
## Purpose ## Purpose
NixDefinitions... NixDefinitions...
- simplifies the job of NixPanel, allowing it to not worry at all about *how* machines work, but simply produce a machine-readable translation of the options set by Administrators. - simplifies the job of NixPanel, allowing it to not worry at all about **how** machines work, but simply produce a machine-readable translation of the options set by Administrators.
- factors out the system configuration that is common between any Fediversity system, defining a simple set of parameters that might differ between them. - factors out the system configuration that is common between any Fediversity system, defining a simple set of parameters that might differ between them.