Repository navigation
fix(core): bump gen so the no-flake entry evaluates without flakes; home declares system once - #748
Merged
Merged
Conversation
…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.
install-nix-action enables the flakes experimental feature, so the noflake job passed while the template failed for users without it (builtins.fetchTree missing).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the no-flake template failing with
attribute 'fetchTree' missingwhen 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 withbuiltins.fetchTree, which upstream Nix only provides under theflakesexperimental feature. gen now fetches them through the fixed-outputbuiltins.fetchTarballwith the samenarHash, 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'ssystemtwice, once onden.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'ssystembehaves as before.CI: the
noflakejob ran with flakes enabled, becauseinstall-nix-actionturns them on, so it passed on main while the template failed for users without flakes. Its two build steps now run withNIX_CONFIG: experimental-features = nix-command.User-facing note: a user module that declares the same option twice, with a
descriptionon both, now gets an error instead of a silent fold, matching nixpkgs.Validation
just cion main before the bump: 1332/1332. After: 1332/1332, with an identical set of test names.home.nixchange, the bump fails 18 home tests inc2with the duplicate-declaration error.nix-build --option experimental-features '' templates/noflake -A flake.nixosConfigurations.igloo.config.system.build.toplevel, withden.outPathpointed at the checkout as in thenoflakejob: fails on main with thefetchTreeerror, builds on this branch.NIX_CONFIG='experimental-features = nix-command' nix-instantiate --eval -E 'builtins ? fetchTree'givesfalse(andtruewithout it), so the job's setting removes the builtin that broke.c2peak memory is unchanged (2.1G before, 2.2G after) and its CPU time drops from 2m37s to 1m02s.