46 lines
1.6 KiB
Markdown
46 lines
1.6 KiB
Markdown
# NixOS Configuration Layout
|
|
|
|
This repository is structured around explicit NixOS and Home Manager layers.
|
|
|
|
## Directory Overview
|
|
|
|
- `nixos/hosts/<host>/`
|
|
- Host-specific `configuration.nix` and `hardware-configuration.nix`.
|
|
- `nixos/modules/`
|
|
- Shared NixOS modules:
|
|
- `base.nix`
|
|
- `profiles/` (`workstation.nix`, `server.nix`)
|
|
- `wm/` (`sway.nix`, `gnome.nix`)
|
|
- `theme/` (`stylix.nix`)
|
|
- `home/users/`
|
|
- User base modules (`alisceon`, `root`).
|
|
- `home/profiles/`
|
|
- Shared Home Manager profile composition.
|
|
- `home/modules/`
|
|
- Home Manager feature modules grouped by `programs/`, `services/`, and `wm/`.
|
|
- `home/hosts/alisceon/`
|
|
- Host-specific Home Manager overrides for `alisceon`.
|
|
- `lib/`
|
|
- Shared helper libraries imported by modules.
|
|
- `util/`
|
|
- Local helper scripts.
|
|
|
|
## Composition Rules
|
|
|
|
- `flake.nix` is the single composition entrypoint for hosts.
|
|
- NixOS host modules should import only host-local hardware config and rely on shared modules from `nixos/modules`.
|
|
- Home Manager host overrides should stay small and contain only host deltas.
|
|
- Reusable behavior belongs in `nixos/modules` or `home/modules`, not in host files.
|
|
|
|
## Local Validation
|
|
|
|
Run these in your normal environment:
|
|
|
|
```bash
|
|
nix flake show
|
|
nix eval .#nixosConfigurations.electra.config.system.build.toplevel.drvPath
|
|
nix eval .#nixosConfigurations.tower.config.system.build.toplevel.drvPath
|
|
nix eval .#nixosConfigurations.tesla-nixos.config.system.build.toplevel.drvPath
|
|
nix eval .#nixosConfigurations.nuc.config.system.build.toplevel.drvPath
|
|
nix flake check --no-build
|
|
```
|