JLLC5ZMBFJNAJXDP4F6G2BKS4VAV5EHWTGXR4OOYRDDTUSNV73QAC - 2 desktops (nixos-unstable-small)- 3 servers (nixos-unstable-small)- 1 Macbook (nix-darwin)- 1 WSL (nixos-wsl)
NixOS configurations for 8 personal machines:| Name | System | Platform | Follows | Active || --------- | ------- | -------------- | ------------------------ | :----: || Blackwell | Server | x86_64-linux | nixos-unstable-small[^1] | ✔ || Date | Laptop | x86_64-linux | nixos-unstable-small[^1] | ✔ || Kiwi | Server | x86_64-linux | nixos-unstable-small[^1] | ✔ || Lime | Macbook | aarch64-darwin | nix-darwin[^2] | || Pear | WSL | x86_64-linux | nixos-wsl[^3] | ✔ || Plum | Server | x86_64-linux | nixos-unstable-small[^1] | ✔ || Sloe | Server | x86_64-linux | nixos-unstable-small[^1] | || Yuzu | Desktop | x86_64-linux | nixos-unstable-small[^1] | ✔ |[^1]: [nixos-unstable-small](https://nixos.wiki/wiki/Nix_channels#:~:text=nixos%2Dunstable%2Dsmall)[^2]: [nix-darwin](https://github.com/nix-darwin/nix-darwin)[^3]: [nixos-wsl](https://github.com/nix-community/NixOS-WSL)
- Dendritic structure with flake-parts- Hjem for home management- Hjem Rum for home modules
- Multiple hosts- Dendritic structure with[flake-parts](https://github.com/hercules-ci/flake-parts)- [Hjem](https://github.com/feel-co/hjem) for home management- [Hjem Rum](https://github.com/snugnug/hjem-rum) for home modules
The `darwin` and `nixos` modules are then used in `modules/hosts.nix` like this:
The `darwin` and `nixos` modules are then used in `modules/hosts.nix`. Modulesare grouped by type at the top of the file to avoid repeated configs and a`mkConfig` helper is used to simplify the inline config module of each host,again to reduce repetition. An example of what this could look like:
This gives us fine-grained control over which hosts have access to whichfeatures.
As mentioned before, additional configuration for the hosts is defined in aninline module inside the `modules = []` section of each host. There we defineconfigurations that are exclusive to the host and can't trivially be made amodule such as unique `secrets` configuration.
Any additional configuration for the hosts is defined in an inline module insidethe `modules = []` section of each host. There we define configurations that areexclusive to the host and can't trivially be made a module such as `hostName`,`operatingSystem` (for conditional modules) and `secrets` configuration.I would like to move some of these variable configs to modules at some point andgroup common modules to keep the hosts file cleaner.
### CIForgejo workflows are generated with actions.nix in `ci/`. On every push, eachhost is built and cached automatically in an S3 bucket using self-hosted runners(see `modules/forgejo-action-runner.nix`).actions.nix is really nice, it gives you the power and flexibility of Nix forcreating workflows. See `ci/nix-ci.nix` and `ci/lib.nix` for some examples.actions.nix: <https://github.com/nialov/actions.nix>
```sh.├── ci/ # CI with actions.nix (generates .forgejo/workflows/*)│ └── ...├── modules/ # All modules live in here│ ├── inputs.nix # flake-file configs│ ├── outputs.nix # Flake outputs│ ├── hosts.nix # Host definitions│ ├── actions.nix # Generates CI workflows from `ci/`│ ├── theme.nix # System-wide theming│ ├── ...│ ├── _to-migrate/ # Modules waiting for migration to new dendritic setup│ │ └── ...│ └── quickshell/ # Quickshell configs (not currently used)│ └── ...├── secrets/ # Secrets managed by agenix│ ├── ...│ └── rekeyed/ # Rekeyed secrets from agenix-rekey│ └── ...├── flake.lock├── flake.nix # Contents generated by flake-file└── ...```