I am trying to update my nix-os setup so that I have the latest version of cargo
. I am failing and I don’t understand the situation. I have the following version:
$ cargo --version
cargo 1.84.1 (66221abde 2024-11-19)
This is neither the one from channel 24.11' (1.82) nor from
unstable’ (1.85), according to NixOS Search.
My nix config is GitHub - Xadeck/nixos-config. As far as I can tell, I should be using the unstable
channel. I have run:
$ nix flake update
$ nixos-rebuild --use-remote-sudo switch --upgrade \
--flake ~/nixos-config#gkmtec
The part that is puzzling me is that I have the version fi want through nix shell ?!?!
$ nix-shell -p cargo --run "cargo --version"
cargo 1.85.0 (d73d2caf9 2024-12-31)
What are the differences ? What I am missing?
Details
Nix channels with sudo:
$ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-unstable
$ sudo nix-channel --list-generations
1 2025-01-10 00:34:14
2 2025-01-15 08:16:24
3 2025-03-24 08:32:42 (current)
and without:
$ nix-channel --list
nixos https://channels.nixos.org/nixos-unstable
$ nix-channel --list-generations
1 2025-01-15 08:16:35
2 2025-03-24 11:55:50 (current)
and the nix info:
$ nix-info -m
- system: `"x86_64-linux"`
- host os: `Linux 6.12.10, NixOS, 25.05 (Warbler), 25.05.20250322.1e5b653`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.24.12`
- channels(root): `"nixos"`
- nixpkgs: `/nix/store/fnc4632ncr5k5la19gp2gb255dx8pi9x-source`