docs: improve diagram

This commit is contained in:
Jay Looney 2025-06-17 17:45:22 -05:00
parent eb24433294
commit a3e0f016e7

View file

@ -14,14 +14,40 @@ It's designed to be **secure, composable, and automated** using modern Nix tooli
- Secrets managed via `sops-nix` - Secrets managed via `sops-nix`
- Deployable with `nixos-rebuild` (and soon `deploy-rs` or `nixos-anywhere`) - Deployable with `nixos-rebuild` (and soon `deploy-rs` or `nixos-anywhere`)
```mermaid ```mermaid
---
title: How it all fits together
---
graph TD graph TD
subgraph Entrypoint
flake
mkSystem
end
subgraph System Configuration
hosts
hosts_conf
hosts_hardware
end
subgraph User Configuration
users_default
users_home
end
subgraph Shared Modules
nixos_mods
home_mods
end
flake["flake.nix"] --> mkSystem["lib/mkSystem"] flake["flake.nix"] --> mkSystem["lib/mkSystem"]
mkSystem --> hosts["hosts/{hostname}/default.nix"] mkSystem --> hosts["hosts/{hostname}/default.nix"]
mkSystem --> users_default["users/{username}/default.nix"] mkSystem --> users_default["users/{username}/default.nix"]
mkSystem -.->|if user home-manager| users_home["users/{username}/home.nix"] mkSystem -.->|if file exists| users_home["users/{username}/home.nix"]
hosts --> nixosMods@{ shape: docs, label: "modules/nixos/*"}
users_home --> homeMods@{ shape: docs, label: "modules/home/*"} hosts --> nixos_mods@{ shape: docs, label: "modules/nixos/*"}
hosts --> hosts_conf["configuration.nix"]
hosts --> hosts_hardware["hardware.nix"]
users_home --> home_mods@{ shape: docs, label: "modules/home/*"}
``` ```
## How to use this? (Deployment) ## How to use this? (Deployment)