# 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 │ └── .nix # den.hosts entity + den.aspects. └── 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` |