lix-module: can't switch after following documentation #375
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#375
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
I followed the tutorial instructions for flake-based configurations1, but Lix does not replace Nix on my system.
After altering my config to the flake listed below, my nix output is still
nix (Nix) 2.18.1
Steps To Reproduce
nixos-rebuild switch --flake .#patroclus
nix --version
Expected behavior
nix --version
outputs:Actual behavior
nix --version
outputs:nix --version
outputAdditional context
EDIT: Fixed a flake typo
Which are awesome, by the way. Thank you! ↩︎
Can you please give the output of
which nix
?@jade yes!
uhhhhhhhhhhhh ok that's weird.
realpath $(which nix)
says some store path to a Nix 2.18 right?I would suggest the following:
Then go looking for
nix-2.18.1
in there. My best guess as to what is broken is that the overlay isn't being applied to whichever nixpkgs the thing is actually coming from. If you find it in there, then use:If that's not a big enough hammer, try adapting this command to your configuration:
(to be clear, the above actually is expected output for a Lix system; we have a stray 2.18 dep or two due to nixos-option. the arrows here are saying "this thing appears elsewhere in the output")
One thing that's suspect about your configuration, by the way, is that your nixpkgs that nix is coming from is rather out of date, since Nix 2.18.2 was released on March 7 2024, and contains security fixes.
Also, FYI, some code review since I am short on ideas:
pkgs
is passed to every nixos module already.config.nixpkgs.system
orpkgs.system
${self}/whatever
in imports is equivalent to./whatever
.I have thought about this some more. I think it's the
specialArgs.pkgs
at fault, since that one doesn't actually apply any overlays and bypasses thenixpkgs.overlays
NixOS option, which means that in turn,pkgs.nix
will get the wrong nix from inside the module that adds it toenvironment.systemPackages
.This was it. Removing the
pkgs
specialArg
was sufficient to solve this issue.Thank you very much for the response, and for the code review! That was very nice and helped me learn some new stuff! 🫶