Skip to content

fix(core): bump gen so the no-flake entry evaluates without flakes; home declares system once - #748

Merged
sini merged 2 commits into
mainfrom
chore/bump-gen-fetchtarball
Nov 6, 2026
Merged

sini merged 2 commits into
mainfrom
chore/bump-gen-fetchtarball

Conversation

@sini

@sini sini commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes the no-flake template failing with attribute 'fetchTree' missing when flakes are not enabled (reported in #740).

den resolves gen from templates/ci/flake.lock, and on the non-flake path it enters gen's standalone root. At the pinned gen, that root fetched every locked source with builtins.fetchTree, which upstream Nix only provides under the flakes experimental feature. gen now fetches them through the fixed-output builtins.fetchTarball with the same narHash, so this bumps the pin (gen and its 23 members; nothing else in the lock moves).

The bump brings one stricter rule: gen-merge now refuses an option declared twice where both declarations state description, which is what nixpkgs' module system does. den declared a home's system twice, once on den.schema.home (where it has to live so it can be an identity key) and once in the home instance module. The instance module now only defines the value, at option-default priority, so a home's system behaves as before.

CI: the noflake job ran with flakes enabled, because install-nix-action turns them on, so it passed on main while the template failed for users without flakes. Its two build steps now run with NIX_CONFIG: experimental-features = nix-command.

User-facing note: a user module that declares the same option twice, with a description on both, now gets an error instead of a silent fold, matching nixpkgs.

Validation

  • just ci on main before the bump: 1332/1332. After: 1332/1332, with an identical set of test names.
  • Without the home.nix change, the bump fails 18 home tests in c2 with the duplicate-declaration error.
  • nix-build --option experimental-features '' templates/noflake -A flake.nixosConfigurations.igloo.config.system.build.toplevel, with den.outPath pointed at the checkout as in the noflake job: fails on main with the fetchTree error, builds on this branch.
  • NIX_CONFIG='experimental-features = nix-command' nix-instantiate --eval -E 'builtins ? fetchTree' gives false (and true without it), so the job's setting removes the builtin that broke.
  • Single-worker c2 peak memory is unchanged (2.1G before, 2.2G after) and its CPU time drops from 2m37s to 1m02s.

…ome declares system once

gen's standalone entry fetched locked sources with builtins.fetchTree, which upstream Nix gates behind the flakes experimental feature; gen now fetches them with fetchTarball. The newer gen-merge refuses an option declared twice where both declarations state description, as nixpkgs does, so home's system keeps its one declaration on den.schema.home and the instance only defines it at option-default priority.
@github-actions github-actions Bot added the allow-ci allow all CI integration tests label Nov 6, 2026
install-nix-action enables the flakes experimental feature, so the noflake job passed while the template failed for users without it (builtins.fetchTree missing).
@sini
sini merged commit e9f8c97 into main Nov 6, 2026
16 checks passed
@sini
sini deleted the chore/bump-gen-fetchtarball branch November 6, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-ci allow all CI integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant