My infra built using my Dendritic libs.
Inputs are extracted from modules option flake-file.inputs and pinned via npins, then loaded using with-inputs.
Hosts are defined at modules/hosts.nix with their respective den.aspects at modules/hosts/.
My den configuration has two namespaces, vix (public) for stuff that is generic enough for others to re-use. And vic (private) for everything that has to do with my user.
build
switchCurrently only vic which is applied at all hosts.
| Host | Platform | Users | Notes |
|---|---|---|---|
| bombadil | NixOS ISO | vic | USB installer, CI build |
| varda | MacOS (M4) | vic | Mac Mini |
| yavanna | MacOS (x86) | vic | MacBook Pro |
| nienna | NixOS | vic | MacBook Pro |
| mordor | NixOS | vic | ASUS ROG Tower |
| annatar | WSL2 | vic | ASUS ROG Tower |
| nargun | NixOS | vic | Lenovo Laptop |
| smaug | NixOS | vic | HP Laptop |
| bill | Ubuntu (ARM) | runner/vic | GH Action Runner |
| bert | MacOS (ARM) | runner/vic | GH Action Runner |
| tom | Ubuntu | runner/vic | GH Action Runner |
modules/community/vix/: reusablevix.*aspects. Others can use them.modules/vic/: my user profile. Groups:shell,vcs,edit,dev,sys.modules/hosts/: one file per host, plus a folder for bigger hosts.modules/diagrams/: generates the diagrams.
- Create
modules/hosts/<h>.nixwith the hostden.aspects. Copynargun.nixas a start. - Add an entry in
modules/hosts.nix, for exampleden.hosts.x86_64-linux.<h>.users.vic = { };. - Boot the target machine. Generate the hardware facts there:
sudo nixos-facter -o modules/hosts/<h>/_nixos/facter.jsonThen sethardware.facter.reportPathto that file. Seefrodo.nix. - If you use disko, point the disk to
/dev/disk/by-id/.... Do not use/dev/nvme0n1. Those names can change between boots. - Run
buildfor the new host before you switch.
facter.json is a snapshot. It does not update itself.
Generate it again after you change RAM, disks, or the board:
sudo nixos-facter -o modules/hosts/<h>/_nixos/facter.jsonDo not trust a build until the file is fresh.
Load shell.nix using direnv .envrc or manually nix-shell.
# .envrc
use nixOther useful commands defined at Justfile
Historical points of this repo:
- Den without flakes current
- Den with flakes + flake-parts
- Dendritic flake-parts only
- blueprint
- flake-parts
- olf m1 flake with mk-darwin-system
- other with snowfall-lib lost