my nix configs
A workflow run on a Rust/Bevy task produced a single @make dispatch covering six tasks (~2 hours of work), with the orchestrator drafting the full replacement code, including a self-contradicting "actually that's wrong, let me correct…" revision pass and a `nix develop --command bash -c "cargo check"` invocation that @make's sandbox denies. None of the failure modes were caught before dispatch. Phase 5 gains three new subsections: - Split Heuristic — explicit rules for when a task must be split (>2 concerns, >50 lines / 2 files, structural+runtime+wiring mix); prescribes the foundations / implementation / wiring split. - Code Context Anti-patterns — the field is for seam-revealing snippets, not finished answers; max ~5-line snippets, no full replacement bodies. - Finalized-Text Rule — task specs must be single-author finalized text, no "actually, that's wrong" revision passes, no two-version code blocks, no unresolved questions. Phase 6 promotes the Rust unit-only NOT_TESTABLE case out of the decision table into a dedicated routing subsection. The orchestrator must pass test *specifications* (one-line behavior descriptions, target functions, assertion types) to @make — never test code — and run the suite once after @make to capture RED→GREEN evidence. Phase 7 gains a mandatory Pre-Dispatch Validation table that rejects specs containing `bash -c` / `sh -c` (any nesting), `nix develop -c bash`, `cd <path> &&`, oversized Code Context blocks, contradictory revisions, or duplicated test bodies. Repeated trips signal a Phase 5 split problem and route back to splitting. |
||
|---|---|---|
| .secrets | ||
| config | ||
| homes | ||
| lib | ||
| modules | ||
| overlays | ||
| packages | ||
| systems | ||
| .gitattributes | ||
| .gitignore | ||
| .sops.yaml | ||
| CLAUDE.md | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
NixOS Configuration
A modular NixOS configuration setup for multiple systems.
Project Structure
modules/: Reusable NixOS/Darwin modulescommon.nix: Common module imports and definitionsnixos/: NixOS-specific moduleshome/: Home Manager integration for NixOSnix/: Nix package manager configurationnix-ld/: Dynamic linking supportnetwork/: Network configuration modulesresolved/: DNS resolution configuration
security/: Security-related modulesssh-host-keys/: SSH host key management
services/: Service configuration modulesbase/: Basic system configurationgui/: Graphical interface setuphomeprinter/: Home printer supportpodman/: Container runtimesecureboot/: Secure boot configuration
sgx/: Intel SGX supportaesmd_dcap/: SGX AESMD DCAP servicepccs/: SGX Provisioning Certificate Caching Service
system/: System configuration modulesauto-upgrade/: Automatic system upgradeslimits/: System resource limitszram/: ZRAM swap configuration
tools/: Common tools configurationdirenv/: Direnv integrationgit/: Git configuration
user/: User account configurationvirtualization/: Virtualization support
home/: Home Manager modulescli-apps/: Command-line applicationsgui/: GUI application configurationtools/: User tools configurationuser/: User preferences
darwin/: Darwin-specific moduleshome/,nix/,security/, etc.
systems/: Individual system configurationsx86_64-linux/: Linux systems on x86_64aarch64-linux/: Linux systems on ARMx86_64-darwin/: macOS systems on x86_64aarch64-darwin/: macOS systems on ARM
homes/: Home Manager configurations for each user/systemlib/: Helper functions and utilitiesoverlays/: Nixpkgs overlayspackages/: Custom packages
Using the Configurations
Install a system via nixos-anywhere
$ nix run github:numtide/nixos-anywhere -- \
--flake 'git+https://git.hoyer.xyz/harald/nixcfg'.#hostname \
root@hostname --no-reboot --tty -i $HOME/.ssh/id_ed25519
... enter disk password
$ ssh -t root@hostname systemd-cryptenroll /dev/luksdev --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=1,15
Update NixOS system
$ nixos-rebuild --use-remote-sudo -L --show-trace --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg boot
Update macOS system
$ darwin-rebuild -L --show-trace --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg switch
Update home-manager configuration
$ nix --refresh run 'git+https://git.hoyer.xyz/harald/nixcfg' -- \
switch -b backup --flake 'git+https://git.hoyer.xyz/harald/nixcfg'