Files
nix/README.md
T
2026-10-21 04:52:51 -05:00

33 lines
1.2 KiB
Markdown

# nix
my [nixos](https://nixos.org/) configuration, structured with [den](https://github.com/vic/den) and [flake-parts](https://github.com/hercules-ci/flake-parts).
## structure
```nix/flake.nix#L1-2
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
```
modules are automatically discovered via [import-tree](https://github.com/vic/import-tree) and composed using `den.aspects`.
```
modules/
├── system/ # os fundamentals
├── services/ # self-hosted services
├── software/ # user software
├── roles.nix # den.aspects.desktop / den.aspects.server bundles
├── hosts/
│ ├── default.nix # den.default (every host)
│ ├── common.nix # shared host attrs (domain, bug user), den.homes, schema
│ └── <host>.nix # den.hosts entity + den.aspects.<host>
└── users/ # user accounts
```
## hosts
| Host | Role | GPU | Switch Command |
|------|------|-----|----------------|
| `nix` | desktop | nvidia | `nh os switch ~/nix --impure -H nix` |
| `styx` | laptop | amd | `nh os switch ~/nix --impure -H styx` |
| `box` | homeserver | — | `nh os switch ~/nix --impure -H box` |