Current nixpkgs deferred nixpkgs.config breaks generated NixOS hosts
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- build-system
調査の方向性
Start with flake.nix and the mkFlake channel configuration, then reproduce the failure with the provided nix eval command. Check the pinned flake-utils-plus host wrapper and upstream issue #162; done means Snowfall evaluates the affected NixOS hosts without the deferred nixpkgs.config assertion after an upstream update or compatibility patch.
索引モデルが issue の本文から書いたものです。
説明
Summary
Current nixpkgs breaks Snowfall-generated NixOS configurations because Snowfall still pins a flake-utils-plus host wrapper whose nixpkgs.config detection is incompatible with the option's current deferred-module semantics.
This is related to, but distinct from, #24 and #73. Those reports involved user modules explicitly setting nixpkgs.config. In this case the failure occurs on a host that has no host-level nixpkgs.config definition.
Versions
- Snowfall Lib:
6ee3542cb459ca4b038cfe50ceb8797f05cdabad(currentmainwhen reproduced) - Snowfall's pinned flake-utils-plus:
3542fe9126dc492e53ddd252bb0260fe035f2c0f - nixpkgs:
f13ff45afd1bb73e640eaa08a7066dbed07e3238fromnixos-unstable
Reproduction
A normal Snowfall configuration with channel configuration is sufficient:
lib.mkFlake {
channels-config.allowUnfree = true;
# regular discovered systems/modules
}
Then evaluate a discovered NixOS host which does not define nixpkgs.config itself:
$ nix eval '.#nixosConfigurations.ceres.config.system.build.toplevel.drvPath'
error:
Failed assertions:
- Your system configures nixpkgs with an externally created instance.
`nixpkgs.config` options should be passed when creating the instance instead.
Defined in:
- .../flake.nix
Cause
Snowfall maps channels-config to flake-utils-plus' channelsConfig, which is correct. The problem is in the pinned flake-utils-plus host builder.
It pre-evaluates the host and tests:
hostConfig.nixpkgs.config == { }
Current nixpkgs declares nixpkgs.config as a deferredModuleWith option and applies it as:
apply = _: finalPkgs.config;
Therefore reading hostConfig.nixpkgs.config returns the fully applied pkgs.config, not the raw module definitions. The empty-config check is no longer valid and the wrapper takes its re-import path even when the host did not configure the option.
The wrapper then defines both:
nixpkgs.pkgs = ...;
nixpkgs.config = lib.mkForce { };
Current nixpkgs rejects any non-default definition of nixpkgs.config when nixpkgs.pkgs is externally supplied, including an explicitly forced empty value.
Tested workaround / fix direction
I tested overriding Snowfall's transitive flake-utils-plus input with a compatibility version that:
- Keeps the raw channel configuration and overlay list when importing each channel.
- Stops pre-evaluating and reading the applied
hostConfig.nixpkgs.configvalue. - Does not define external
nixpkgs.pkgsfor NixOS hosts. - Supplies the raw channel config and overlays as ordinary
nixpkgs.configandnixpkgs.overlaysmodule definitions, allowing NixOS to construct the package set.
With that change, three active hosts evaluate, including one with a host-specific permittedInsecurePackages value. Home Manager still uses global packages and the configured overlays remain active.
Simply overriding to flake-utils-plus v1.6.0 did not help because the relevant host wrapper is still present there.
Would you be open to updating the transitive dependency once flake-utils-plus fixes this, or carrying a compatibility patch in Snowfall in the meantime?
Related upstream issues: gytis-ivaskevicius/flake-utils-plus#136 and gytis-ivaskevicius/flake-utils-plus#142.
Tracking
The corresponding flake-utils-plus report is gytis-ivaskevicius/flake-utils-plus#162. The underlying wrapper fix belongs there; this issue tracks updating or patching Snowfall's transitive dependency.
- 主要言語
- Nix
- スター
- 628
- フォーク
- 66
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
snowfallorg/lib のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
snowfallorg/lib#159 · リアクション 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
snowfallorg/lib#190 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
snowfallorg/lib#188 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
snowfallorg/lib#186 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
snowfallorg/lib#185 · コメント 5 件 ·
snowfallorg/lib の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
agent:Windows bug code-review MEDIUM tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
mgradwohl/tasksmack#2960 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Area: Instruments Bug Difficulty: Low Priority: Low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 ·
メンテナーはふだん 1 日以内に返信
-
package_info fails analysis with --incompatible_stop_exporting_build_file_path対応中かも @mkanat が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
bazelbuild/rules_license#184 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
k2-fsa/sherpa-onnx#4100 ·
メンテナーはふだん 2 日以内に返信