From 7cd9370366cd3aaa53bd307f951e1db99ac0cf72 Mon Sep 17 00:00:00 2001 From: alexion Date: Sun, 19 Jul 2026 11:44:08 -0400 Subject: [PATCH] docs: refresh the gotchas for a self-hosting dev machine The dev host no longer runs CachyOS, so the per-command experimental-features export and the from-source CachyOS kernel build no longer apply. Records the missing git identity in their place. --- CLAUDE.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index ddc308c..1056951 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -24,16 +24,13 @@ The domain model (Host, Module, Skeleton, Auto-loader, Enable convention, overla ## Gotchas -- Nix on the dev host needs experimental features passed per-command. - This repo is developed on `neogaia` while it still runs **CachyOS** (the migration target), where Nix is the distro package at `/usr/bin/nix` in multi-user daemon mode. - The system `/etc/nix/nix.conf` does not enable flakes, so export `NIX_CONFIG="experimental-features = nix-command flakes"` (or pass `--extra-experimental-features 'nix-command flakes'`) for every command. -- The dev user is a non-trusted daemon client (`nix store info` reports `Trusted: 0`). - You cannot add substituters from the CLI, so rely on what the flake/config declares (e.g. the chaotic cache is wired by the chaotic module, not a CLI flag). - Caveat that bites when a Host actually selects the CachyOS kernel: the substituters a `nix build` fetches from are the **daemon's** (`/etc/nix/nix.conf`), *not* the `nix.settings` of the config being built — those only govern the built system. - This dev host's `/etc/nix/nix.conf` has no `substituters`/`trusted-substituters` lines, so building a toplevel whose `boot.kernelPackages` is `linuxPackages_cachyos` compiles the kernel (and rustc bootstrap, etc.) from source instead of hitting `nyx-cache`. - To build such a Host here, first add `extra-substituters = https://nyx-cache.chaotic.cx/` and `extra-trusted-public-keys = nyx-cache.chaotic.cx:dJxTrgMC3V3cFfyIiBQDQorG6k1LsqurH/srpMSq7qk=` to `/etc/nix/nix.conf` (sudo) and `sudo systemctl restart nix-daemon`. - `nix eval` of the kernel version does *not* trigger this — only a real build does. -- If `/nix/store` is missing or `nix-daemon` is inactive after a fresh Nix install, initialise it with `sudo systemd-tmpfiles --create nix-daemon.conf && sudo systemctl enable --now nix-daemon.socket`. +- This repo is developed on `neogaia`, which now runs the NixOS it builds. + Flakes and the chaotic substituter come from this flake's own `nix.settings`, so no `NIX_CONFIG` export or per-command `--extra-experimental-features` is needed, and building a toplevel with `boot.kernelPackages = linuxPackages_cachyos` fetches the kernel from `nyx-cache` rather than compiling it. + Both were true only while the machine still ran CachyOS against a distro Nix daemon. +- The substituters a `nix build` fetches from are the **daemon's** (`/etc/nix/nix.conf`), *not* the `nix.settings` of the config being built — those only govern the built system. + The two coincide here because the dev host runs this flake; they diverge on any machine that does not. +- Git identity is not configured anywhere yet — no `programs.git` in the flake and no `~/.gitconfig`, so `git commit` fails with "Author identity unknown". + History uses `alexion `; pass it per-commit with `git -c user.name=… -c user.email=…` rather than writing config outside the flake. - The primary build/verify seam for any Host is `nix flake check`, which builds `checks.x86_64-linux.` (the system toplevel); cheap targeted checks use `nix eval .#nixosConfigurations..config...`. - chaotic-nyx must **not** follow our `nixpkgs`, and its packages are built against chaotic's own pinned nixpkgs (its overlay defaults to `onTopOf = "flake-nixpkgs"`, the cache-friendly path). That is what lets the `nyx-cache.chaotic.cx` binary cache hit instead of compiling the CachyOS kernel from source; the tradeoff is that chaotic packages do not see our `unstable`/`stable` overlays.