Building an ISO from a flake doesn't ensure that experimental-feature flakes is enabled, so <nixpkgs>
does not evaluate
#292465
Labels
0.kind: bug
Something is broken
Describe the bug
ping @tpwrules
Regression (well, kinda) from #254405
Report: https://matrix.to/#/!VRULIdgoKmKPzJZzjj:nixos.org/$2BjkrwyIQLbywLKdVlza-qCtD-2VqEn8LyDrhrYlieg?via=nixos.org&via=matrix.org&via=nixos.dev
To our understanding, the issue is that
nixos-install
runsnix-build <nixpkgs> -A hello
or a similar command, which fails if flakes are disabled but NIX_PATH contains a flake reference. This is, on the first order, reasonable behaviour from nix, but it does mean that our stuff is broken in such an instance.The fix here is probably to simply enable flakes on the resulting system by default so that
flake:nixpkgs
inNIX_PATH
will evaluate correctly. I don't think this is a major problem to do, since by having encountered this problem in the first place, our user has already been using flakes!Another secondary bug is that the channel is copied twice to ISOs: possibly we should either disable the channel for ISOs generated with the flake pins, or we should disable the flake pins on ISOs.
Steps To Reproduce
Steps to reproduce the behavior:
nixos-install
fails with weird errorExpected behavior
A clear and concise description of what you expected to happen.
Expect it to either work using the channel in the ISO or using the pinned nixpkgs.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: