Select the CachyOS kernel per-Host via boot.kernelPackages, enable Intel microcode and redistributable firmware (ath10k for the QCA6174 wifi), and move zram behind a toggle Module. Declare the chaotic binary cache in the base Nix settings (extra-substituters/keys) so the built system fetches the kernel from nyx-cache rather than compiling it.
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. - 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
Modulekept minimal.modules/zram.nixis a pure toggle (zramSwap.enable = trueundermkIf), following themodules/example.nixreference shape. This preserves task 0002's exact behaviour while moving the switch behind theEnable convention; the directzramSwap.enable = truepreviously inline in theHostwas removed in favour ofmodules.zram.enable = true. - Why zram graduated to a
Modulebut kernel/microcode/firmware stayed inline. zram is a reusable, cross-Hostfeature toggle (the spec calls for it as aModule), whereas the kernel choice, Intel microcode, and firmware are neogaia-specific hardware facts that belong to theHostitself.