I am using NixOS and I am on the Unstable branch using gnome as my DE:
~ > sudo nix-channel --list
However I am still on Gnome 43.3, and no matter how many times I do
~ > sudo nix-channel --update
before nixos-rebuild --switch, Gnome won’t update to 44. Does anyone know why this is the case?
Did you run
nixos-rebuild switch to actually switch your system to a new config based on the updated channel?
You will also need to restart gnome (or just your machine) to actually start using the new version.
Thanks for the quick reply. Yes I did. I just realized I am using ZFS and have set this in my
Do you know if it has something to do with this flag:
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages
What’s the output of
cat /etc/os-release ?
I wouldn’t expect the kernel to affect the gnome version.
This is the output:
~ > cat /etc/os-release
PRETTY_NAME="NixOS 23.05 (Stoat)"
Yeah, so your current system is on commit
3c5319ad3aa of nixpkgs, which was committed on March 4th, so it seems that you are not actually upgrading your system.
What is the output of running
sudo nixos-rebuild --upgrade switch ?
Here is the output:
~ > sudo nix-channel --list
~ > sudo nixos-rebuild switch --upgrade -I nixos-config=./configuration.nix
building the system configuration...
updating GRUB 2 menu...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
lsblk: /dev/mapper/no*[0-9]: not a block device
lsblk: /dev/mapper/block*[0-9]: not a block device
lsblk: /dev/mapper/devices*[0-9]: not a block device
lsblk: /dev/mapper/found*[0-9]: not a block device
activating the configuration...
setting up /etc...
reloading user units for nixos-user...
setting up tmpfiles
the following new units were started: libvirtd.service
Hmm, I’m not sure what’s happening here.
Did you actually reboot? If so, then my first idea would be that there’s an issue with the bootloader config.
It seems that the new generation is being built, but that it’s not being used.
Did the commit hash in /etc/os-release change after you ran this command?
Could you share your actual config?
What version of nix are you on?
If you are on nix 2.14 or 2.15, there are some known problems with channel based setups and the newer versions of nix, I can’t find the issues though.
One of the issues is that
nix-channel --update updates the channels in a different location than where
nixos-rebuild will search for them.
One workaround is to downgrade to nix 2.13, the other is to use
-I nixpkgs=… to point
nixos-rebuild to the correct location or permanently alter the
NIX_PATH environment variable to point there.
As I haven’t used channels in the last 2 years, I do not know the details, just reciting what I’ve heard in the various chats and posts over the last couple of weeks.
Thanks for the tip. I didn’t think of that one. But after I checked, it stayed the same.
Yes that was exactly the problem! Thank you! I was using this line in my config:
nix.package = pkgs.nixUnstable;
After removing this line and going back to a stable nix version (2.13.3) all worked fine. I’ll need to take my time and move my configs to a flake.