Skip to content

hyprland: drop nixpkgs follows, consume flake packages, substitute from hyprland.cachix.org - #39

Merged
kriswill merged 2 commits into
mainfrom
hyprland-drop-follows
Jul 12, 2026
Merged

hyprland: drop nixpkgs follows, consume flake packages, substitute from hyprland.cachix.org#39
kriswill merged 2 commits into
mainfrom
hyprland-drop-follows

Conversation

@kriswill

Copy link
Copy Markdown
Owner

What

Converts the hypr* stack from source-built-every-bump to cache-substituted:

  1. flake.nix — the hyprland input no longer follows our nixpkgs; nixConfig advertises hyprland.cachix.org + key for trusted interactive callers.
  2. nebulaprograms.hyprland.{package,portalPackage} come from inputs.hyprland.packages.* (the exact drvs upstream CI pushes) instead of the hyprland-packages/hyprland-extras overlays, which are removed. nix.settings adds the substituter/key pair for nebula's daemon.
  3. CI — the nebula job passes the pair via determinate-nix-action's extra-conf (runners ignore flake nixConfig as untrusted). darwin job untouched — its closures never contain the stack.
  4. dotfiles-stow — the activation script's hyprctl now references config.programs.hyprland.package, not pkgs.hyprland, so the closure doesn't regain a second hyprland from nixpkgs.

Key findings (machine-verified, full detail in knowledge/decisions/hyprland-unfollow-cachix.md)

  • The overlay path could never hit upstream's cache (rebuilds against our nixpkgs). Yet this week the overlay-built drv WAS on the cachix: our nixpkgs and upstream's lock were 1,570 commits apart but drv-equivalent for hyprland's closure. The 1–2 h weekly CI builds happened only because nothing subscribed to the cache.
  • Caveat discovered: nix flake lock resolves the un-followed nixpkgs fresh from nixos-unstable HEAD, not from hyprland's own lock — so hits are probabilistic (most weeks), not structural. Miss weeks source-build once; FlakeHub serves it on, same as today.
  • The overlay's global hyprutils bump tainted hyprpolkitagent into a drv cached nowhere (404 both caches); it reverts to the Hydra-cached nixpkgs drv (200). Same mechanism as the historical hyprlock breakage — that class is closed.

Verification

  • nebula toplevel + darwin k eval green; hyprland outPath byte-identical to the overlay build this week; hyprland + xdph narinfos 200 from the cachix
  • Full drv-graph hypr inventory: only the flake stack (cachix-served) + pure-nixpkgs deps (Hydra-served)
  • okf validate 172 files / 0 errors; actionlint clean; statix/deadnix clean; nix fmt applied
  • Stale "caches can never hit" claims corrected in ci.yml, docs/hyprland.md, and four knowledge docs

What CI on this PR should show

The nebula job substituting the hypr* stack instead of building it. (This week hyprland's paths are also in FlakeHub from PR #36, so the cachix proof is partly masked — the de-tainted hyprpolkitagent coming from cache.nixos.org is the visible delta.)

After merge, nebula needs a regular nrs; the daemon picks up the new substituter from the same activation.

kriswill added 2 commits July 12, 2026 00:38
Three coupled changes so the hypr* stack substitutes instead of source-
building:

* flake.nix: hyprland input no longer follows our nixpkgs, and nixConfig
  advertises hyprland.cachix.org (+ trusted key). nix flake lock resolves
  the un-followed dep fresh from nixos-unstable (NOT upstream's own lock),
  so cache hits are still drv-equivalence with upstream's lock rather than
  a structural guarantee — this week they are byte-identical.

* nebula: programs.hyprland.{package,portalPackage} now come from
  inputs.hyprland.packages (the drvs upstream CI actually pushes) instead
  of the hyprland-packages/hyprland-extras overlays (dropped), which
  rebuilt the whole stack against our nixpkgs and could never hit any
  cache. nix.settings adds the substituter/key pair for the daemon.

* dotfiles-stow: hyprctl comes from config.programs.hyprland.package so
  the reload helper tracks the configured compositor instead of
  re-introducing a second pkgs.hyprland into the closure.

Side effect verified: hyprpolkitagent de-taints back to the pure nixpkgs
drv (Hydra-cached; the overlay's hyprutils previously forced it to source-
build with no cache anywhere). rose-pine-hyprcursor was never tainted.

Verified: nebula toplevel + darwin k eval green; hyprland AND xdph
outPaths return HTTP 200 from hyprland.cachix.org (hyprland's outPath is
literally identical to the overlay build this week — same nixpkgs rev);
full drv-graph hypr inventory shows only the flake stack (cachix) and
pure-nixpkgs deps (Hydra).
…llows claims

The runner ignores the flake's nixConfig as untrusted, so the substituter/
key pair goes to determinate-nix-action via extra-conf — nebula job only;
the darwin closures never contain the hypr* stack.

Documentation catch-up for the un-follow:
* new decision record knowledge/decisions/hyprland-unfollow-cachix.md (the
  probabilistic-hit reality, the overlay taint findings, the three wiring
  points, watch items)
* ci.yml header + ci-github-actions accepted-cost bullet rewritten (the
  "upstream caches can never hit" claim is dead; noctalia still follows —
  it has no upstream cache)
* docs/hyprland.md: install paragraph + xdph entry corrected, dated
  learned-behaviours entry added, old hyprutils-breakage entry annotated
* knowledge: hyprland module + nebula host + cross-os-module-twins pattern
  corrected; log.md; okf index + validate green (172 files, 0 errors)
@kriswill
kriswill merged commit 575887e into main Jul 12, 2026
3 checks passed
@kriswill
kriswill deleted the hyprland-drop-follows branch July 12, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant