Newbie: Confused about outdated packages

I just setup my first NixOS system!

I have a very slim KDE Plasma setup with MullvadVPN, other packages should be flatpaks I think, though not sure.

It seems there are multiple ways to install MullvadVPN, and the one I used results in a very outdated package (2024.8 instead of 2025.3)

This is my config

   services.mullvad-vpn.enable = true ;
   services.mullvad-vpn.package = pkgs.mullvad-vpn ;

   ...

  # List packages installed in system profile. To search, run:
  # $ nix search wget
   environment.systemPackages = with pkgs; [
     wget
     curl
     aria2
     git
     nano
     fish
     htop
     btop
     powertop
     usbguard
     usbguard-notifier
     cosmic-term
     kate
   ];

The package for mullvad is on 2025.3 like upstream, but one of these config lines pulls in the outdated one.

I already tried removing the second like that installs the GUI app mullvad-vpn as a service, that didnt change anything yet.

Where would I fix this so that these lines work again?

The version on stable is 2024.8:

https://search.nixos.org/packages?channel=24.11&from=0&size=50&sort=relevance&type=packages&query=Mullvad-VPN

If you want newer packages than what’s on the stable release, you’d have to use nixos-unstable for the most part, or override the .package option.

2 Likes

Yes I thought so.

How can I change the whole system or a single package to unstable?

I found this thread but the solutions are confusing and I also want to have the services updated

Welcome aboard!

Since you just installed NixOS, I’d assume you’re using the channels system.

The straight answer to what you’re looking for is:

# nix-channel --add https://channels.nixos.org/nixos-unstable nixos \
  && nix-channel --update

This should add the nixos-unstable channel and update its references. You can check the list of available channels with:

# nix-channel --list

Finally, to upgrade your system:

 # nixos-rebuild switch --upgrade

Here you have access to the official NixOS user manual: NixOS Manual

A couple of tips to help you get started in the right way whenever you want to install a new app:

  • Check the wiki for pointers: https://wiki.nixos.org
  • Check if there exists an NixOS option that handles it: NixOS Search? (Make sure to select the right release channel!)

HTH

Edit: updated the answer

1 Like

Thanks!

Would adding that channel upgrade the entire system? I kinda like not having everything updated.

I would also like to have KDE Plasma updated but not the rest.

So not only packages but also groups

Btw, installation was pretty okayish!

Hey @BoredSquirrel, I just updated my previous answer–which was pretty bare, with your new questions (I’m on a rush :sweat_smile:)

Once you switch to the unstable channel (not that unstable at all, to be fair) and run the nixos-rebuild --switch --upgrade command, you’ll create a new NixOS generation with everything pulled from the new channel.

Since you will also be upgrading your desktop environment, I’d suggest you log out and back in to avoid any issues, as the --switch flag instructs nixos-rebuid to automatically switch to the new generation after a successful build. But, since the kernel and many infrastructure packages will also be upgraded, just systemctl reboot to pick up all the new stuff.

Incidentally, you can also build a new generation with the --boot flag, e.g. nixos-rebuild --boot , which will update your boot menu but won’t switch to the new generation automatically, leaving you the freedom to continue working with your system and boot into the new nixos-unstable generation later :slight_smile:

Another tip: at some point, you might want to install unfree packages (nixos-rebuild will let you know about it LOL); you can learn more about it here: Unfree software - NixOS Wiki
While the link to the manual points to the stable channel, you can easily switch to the manual for the unstable channel by just editing the manual URL (I checked in advance and there aren’t any changes).

As @waffle8946 mentions, you can mix up both channels if you want to—that’s what I do in my flake.

For the infrastructure part of the system (kernel, KDE, system packages, etc), I track stable, but I install about 99% of the CLI tools from nixos-unstable, and even the few GUI apps that are not correctly packaged or aren’t yet packaged in Flatpak.

This way, I upgrade the rock-solid system foundation every seven months, while continuously upgrading the GUI and CLI/TUI apps.

1 Like

To achieve that without flakes, you’d add the nixos-unstable channel under a different name (I’d recommend nixos-unstable or maybe nixpkgs-unstable) and then you can import it anywhere, e.g.:

let 
  pkgs-unstable = import <nixos-unstable> { };
in 
{
  services.mullvad-vpn.package = pkgs-unstable.mullvad-vpn;
}

YSK that this can cause issues.

NixOS modules are not necessarily compatible with all versions of a package. New features or small changes in CLI args and such can completely break a package, sometimes in subtle ways. You’re relying on the package not changing anything about its API. This is often true, but far from always.

Just using packages from unstable can also sometimes be a problem, particularly with anything graphics related. Graphics libraries are inherently singleton, since they end up being tied to an underlying graphics driver. Nix’ packaging for this means that you can end up with applications incompatible with your graphics libraries.

It’s not particularly common, but it’s certainly not as stable as you’d hope.

You also eat a pretty heavy disk space cost, since you have to duplicate basically all libraries on your system.

For these reasons I wouldn’t recommend trying this for all of plasma. It’d be kinda difficult to do anyway, given how many packages your average DE consists of.

IMO you should minimize use of mixed channels as much as possible. Once a package has all features you need on stable, just stick to that; this should only ever take 6 months. Or stick to unstable and deal with the fact that your config can break any time, and don’t come complaining if it does, like some people do…

There definitely are use cases for doing this, though, and it is far less destructive than doing it on e.g. Debian.

2 Likes

Thank you!

I think I understand the issue, and the duplication seems to be totally fine when coming from an atomic system :wink:

It is a shame when normally updated packages conflict with stable ones. Like when GIMP3 was only in GNOME-nightly flathub repo, which is huge and updated all the time, even though GIMP3 does not need any of these updated packages.

So I would put this in my configuration.nix before the regular service line, like an alias?

Could I also separate out the config files, using numbers?

Like /etc/nixos/1-kde-plasma.nix 2-unstable-packages.nix and configuration.nix ?

Thanks a lot!

Update: it seems something is wrong, not sure if related to the added channel.

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error:
       … while calling the 'import' builtin
         at «string»:1:6:
            1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
             |      ^

       … while realising the context of a path

       … while calling the 'findFile' builtin
         at «string»:1:13:
            1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
             |             ^

       error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)
sudo nixos-rebuild switch
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error:
       … while calling the 'import' builtin
         at «string»:1:6:
            1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
             |      ^

       … while realising the context of a path

       … while calling the 'findFile' builtin
         at «string»:1:13:
            1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
             |             ^

       error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring

That looks like you removed the nixpkgs channel, which is required to do practically anything with NixOS :stuck_out_tongue:

Can you share the contents of sudo nix-channel --list, as well as nix-channel --list for good measure?

Specifically, I meant this when applied to your full config, making an educated guess at the relevant but omitted parts:

{ pkgs, ... }: let 
  pkgs-unstable = import <nixos-unstable> { };
in 

   ...

   services.mullvad-vpn.enable = true ;
   services.mullvad-vpn.package = pkgs-unstable.mullvad-vpn ;

   ...

  # List packages installed in system profile. To search, run:
  # $ nix search wget


  ## Note that we still use `pkgs` here, so these are all
  ## from stable
   environment.systemPackages = with pkgs; [
     wget
     curl
     aria2
     git
     nano
     fish
     htop
     btop
     powertop
     usbguard
     usbguard-notifier
     cosmic-term
     kate

     # You could also add unstable packages to the list, e.g.
     # pkgs-unstable.emacs
   ];

Erm, yeees, you can split your configuration, I don’t fully understand what you mean by using numbers…?

You certainly could create files like that, but I don’t understand from just their names what you would put in them. Maybe you subtly misunderstood what I meant and based some kind of repository structure on that misunderstanding?

1 Like

Thanks!

Yes it seems I have removed nixos default channel.

Will try tomorrow again.

In the meantime I messed up the default channels but that got fixed again.

I will try your snippet and see if that works. I will try and install a bunch of things like that.

With the separate config files, it seems you can source a directory.

I will try and separate out the parts I want into files in /etc/nixos/configuration/