Current nixpkgs deferred nixpkgs.config breaks generated NixOS hosts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Nix
- Star
- 627
- Fork
- 66
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của snowfallorg/lib
-
Documentation: `/homes/${system}/${user}` vs `/homes/${system}/${user}@${host}` capabilitiesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
snowfallorg/lib#159 · 3 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
snowfallorg/lib#190 · 1 bình luận ·
-
`_modules.args` is not respectedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
snowfallorg/lib#188 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
snowfallorg/lib#186 ·
-
nixos-generators is deprecatedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
snowfallorg/lib#185 · 5 bình luận ·
Tất cả issue của snowfallorg/lib
Issue tương tự
-
Build: the CUDA backend fails without cuDNN instead of skipping the cuDNN shim (as the cuDF shim does)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
beehive-lab/TornadoVM#1248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SimVascular/svZeroDSolver#253 ·
-
difficulty: easy domain: devops effort: 1-4h enhancement good first issue smart-contracts Stellar Wave
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Kaycee276/Chesster#469 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-generated bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
VV01T3K/ResearchCruiseApp#463 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
tesseract-ocr/tesseract#4653 ·
Maintainer thường phản hồi trong vòng 1 ngày