Stand up the walking skeleton the rest of the laptop MVI extends and re-verifies against: the whole neogaia Host evaluates and its system toplevel builds (nix flake check green). - flake.nix: hand-rolled flake (no flake-parts). Base nixos-unstable, plus nixpkgs-unstable and nixos-25.05 for the per-package unstable/stable overlays, home-manager (nixpkgs followed), and chaotic-nyx (deliberately not following our nixpkgs, to keep its binary cache usable). checks build each Host toplevel. - lib/: trimmed helper lib — the Auto-loader (recursive .nix discovery, no null-placeholder hack), the host-builder, and the script-from-file helper. Deps inherited explicitly; no with lib.my, no nixosModules output. - system/: shared base config — the unstable/stable overlays, the user option (defaults to alexion, in wheel, drives system + home-manager user in lockstep), flakes, git, and home-manager as a NixOS module. - modules/example.nix: Auto-loader / Enable-convention reference Module, inert until enabled. - hosts/neogaia/: minimal laptop Host — placeholder filesystems, bootloader, and hardware profile, all superseded by disko in task 0002. - CLAUDE.md: project agent instructions with a Gotchas section (nix on the CachyOS dev host, the chaotic overlay/cache behaviour, tea/Gitea).
4.7 KiB
spec
| spec |
|---|
| laptop-mvi |
What to build
Stand up the Skeleton and a minimal neogaia Host that evaluates and whose system toplevel builds — the walking skeleton every later slice extends and re-verifies against.
The Skeleton is a hand-rolled flake (no flake-parts): nixos-unstable base channel, an unstable overlay exposing nixpkgs-unstable as unstable.<name>, a stable overlay exposing nixos-25.05 as stable.<name>, and chaotic-nyx wired as an input with its overlay and binary cache.
The helper lib is trimmed to three pieces: the Auto-loader (recursively discovers and imports every Module under modules/ and every Host under hosts/ with no null-placeholder traversal hack), the host-builder, and the script-from-file helper.
with lib.my is not used — dependencies are inherited explicitly.
The Enable convention uses the stdlib enable-option helper; every Module is imported unconditionally and guards its body with mkIf config.modules.<path>.enable.
home-manager is sourced from nix-community (master, nixpkgs followed) and integrated as a NixOS module with global packages and user packages.
The user is an explicit option defaulting to alexion (no impure environment lookup), placed in wheel, driving the system user and the home-manager user in lockstep.
The neogaia Host carries only enough (placeholder hardware-configuration.nix, filesystems/bootloader stubs, stateVersion) to make nixosConfigurations.neogaia.config.system.build.toplevel evaluate and build; real disk/kernel/networking arrive in later slices.
Design the per-Host layout so disk layout, kernel, and channel are all per-Host concerns from the start (story 20), so the desktop and servers extend this foundation without restructuring.
Acceptance criteria
nix flake checksucceeds and the flake exposesnixosConfigurations.neogaia.nixosConfigurations.neogaia.config.system.build.toplevelbuilds.- Adding a new
.nixfile undermodules/is auto-discovered and imported without editing anyimportslist, and stays inert until itsenableflag is set. - All three overlays resolve:
unstable.<pkg>,stable.<pkg>, and a chaotic-nyx package are each reachable in aHost. - home-manager builds as part of the same
nixos-rebuild switchtoplevel (system + user environment atomic). - The
useroption defaults toalexion, has no impure environment lookup, places the user inwheel, and drives both the system and home-manager user. - The old
nixosModulesflake output and thewith lib.myidiom are absent.
Implementation Notes
- Verification.
nix flake checkbuildschecks.x86_64-linux.neogaia= the Host toplevel (the spec's primary seam). Overlays confirmed vianix evalofpkgs.unstable.hello(2.12.3),pkgs.stable.hello(2.12.1), andpkgs.linuxPackages_cachyos.kernel(7.1.3, from chaotic). Auto-loader inertness confirmed both ways: the referencemodules/example.nixis off by default, andextendModuleswithmodules.example.enable = trueactivates its body. - chaotic binary cache. Wired via
inputs.chaotic.nixosModules.default, which puts both thenyx-cache.chaotic.cxsubstituter and its trusted public key into the built config (verified by evaluatingconfig.nix.settings.substituters/trusted-public-keys). chaotic deliberately does not follow our nixpkgs, so the cache stays usable. Making the substituter/key explicit is task 0003's concern; here it is inherited from the module. - Shared base lives in
system/. The Skeleton's shared base config (overlays,user, flakes, home-manager wiring) is asystem/module always imported by the host-builder, kept separate from the auto-loaded featureModules undermodules/so the base is never gated by anenableflag. modules/example.nixkept intentionally. It is the Auto-loader / Enable-convention reference every real Module copies; remove it once a real Module supersedes its teaching value.scriptFromFilepresent but unused. The task mandates the helper lib carry it ("the script-from-file helper"); its first caller lands with a later Module.- Home-manager base user only. The base sets
home.username/homeDirectory/stateVersionfor theuser;extraSpecialArgspasses bothinputsandmy(the flake lib) so upcoming HM Modules (fish/tmux/nvim) can reachscriptFromFile. - Deviations from plan. Added an
options.user.description(GECOS) alongsideuser.name— small and expected for a real account. Baselinegit+ globalallowUnfreeare set in the base (git is required for flakes; unfree is needed by chaotic/home-manager and later Claude Code). PlaceholderfileSystems/bootloader andhardware-configuration.nixinneogaiaare stubs that task 0002 (disko) replaces.