modules/zram.nix only wrapped the native zramSwap.enable toggle without adding anything. Rewrite the touched comments to describe only the current file content, and record the in-file-comment convention in CLAUDE.md.
3.6 KiB
3.6 KiB
spec, blocked-by
| spec | blocked-by |
|---|---|
| laptop-mvi | 0001-skeleton-and-building-host |
What to build
Give neogaia the kernel and hardware enablement it needs to run well on the Dell XPS 13 9380: the CachyOS kernel pulled as a binary from chaotic-nyx (not compiled from source), Intel microcode, and the redistributable firmware for the QCA6174 wifi. Add a zram toggle Module and enable it here.
The kernel is selected through a small per-Host kernel mechanism so other Hosts can choose different kernels. The chaotic substituter and its trusted public key are added to the Nix settings so the kernel is fetched from the binary cache from the first build.
Acceptance criteria
neogaiaruns the CachyOS kernel selected via a per-Hostkernel mechanism, sourced from chaotic-nyx.- The chaotic substituter and trusted public key are in the Nix settings, so the kernel is fetched from cache rather than compiled.
- Intel microcode is enabled.
- Redistributable firmware is enabled so the QCA6174 wifi hardware is available.
- [-] A zram toggle
Moduleexists (following theEnable convention) and is enabled onneogaia. — Module dropped in PR review; zram is enabled inline onneogaiainstead (see notes). - The
neogaiatoplevel still builds with all of the above.
Implementation Notes
- Per-
Hostkernel mechanism = nativeboot.kernelPackages. neogaia setsboot.kernelPackages = pkgs.linuxPackages_cachyosdirectly in its Host directory (hosts/neogaia/default.nix). No custom wrapper option was added:boot.kernelPackagesis already a per-Hostsetting, so otherHosts pick their own kernel the same way. A string→package wrapper would have been premature abstraction with oneHostand one kernel, so it was deliberately left out; the "mechanism" is the per-Hostplacement of the native option. - Substituter/key live in the shared base, via the
extra-options. They were added tosystem/default.nix(shared by everyHost), not just neogaia, because the chaotic module is wired for allHosts and the cache is general plumbing.nix.settings.extra-substituters/extra-trusted-public-keysare used rather than the replacingsubstituters/trusted-public-keys, socache.nixos.org(and any other substituter) is only appended to, never dropped. chaotic's own module also provides these entries; the explicit declaration is belt-and-suspenders and keeps the built system's cache config visible and independent of that module. - Dev-host build needed a daemon-level cache. Building the toplevel here first compiled the CachyOS kernel (and rustc bootstrap) from source, because the build daemon's
/etc/nix/nix.confhad nonyx-cachesubstituter — the built system'snix.settingsdo not govern the daemon doing the build, and the dev user is a non-trusted client that cannot add substituters from the CLI. Addingextra-substituters/extra-trusted-public-keysfornyx-cacheto/etc/nix/nix.conf(sudo) and restartingnix-daemonfixed it; the build then fetched the kernel (7.1.3) from the cache. Recorded as a gotcha inCLAUDE.md. - zram is enabled inline, not as a
Module(criterion 5 dropped). The task asked for a zram toggleModule, and one was built first (modules/zram.nix), but PR review rejected it as a single-line abstraction that wraps the nativezramSwap.enabletoggle without adding anything. It was removed, andneogaiasetszramSwap.enable = truedirectly, as it did before task 0003. TheEnable conventionreference remainsmodules/example.nix; real featureModules arrive with fish/tmux/nvim/Claude Code in later tasks.