Can't install package unstable channel

I’m on the unstable channel 26.05 using a basic flake.

When I try to install a package from the unstable channel I get an error.

Building NixOS configurationerror:… while calling the ‘head’ builtinat /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/lib/attrsets.nix:1696:13:1695|           if length values == 1 || pred here (elemAt values 1) (head values) then1696|             head values|             ^1697|           else
   … while evaluating the attribute 'value'
     at /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/lib/modules.nix:1118:7:
     1117|     // {
     1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
         |       ^
     1119|       inherit (res.defsFinal') highestPrio;

   … while evaluating the option `system.build.toplevel':

   … while evaluating definitions from `/nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixos/modules/system/activation/top-level.nix':

   … while evaluating the option `system.systemBuilderArgs':

   … while evaluating definitions from `/nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixos/modules/system/activation/activatable-system.nix':

   … while evaluating the option `system.activationScripts.etc.text':

   … while evaluating definitions from `/nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixos/modules/system/etc/etc-activation.nix':

   … while evaluating definitions from `/nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixos/modules/system/etc/etc.nix':

   … while evaluating the option `environment.etc.dbus-1.source':

   … while evaluating the option `environment.systemPackages':

   … while evaluating definitions from `/nix/store/hv1nh2b65idfq7vwyajqi2p38dkhy0c0-source/configuration.nix':

   (stack trace truncated; use '--show-trace' to show the full, detailed trace)

   error: undefined variable 'noctalia-shell'
   at /nix/store/hv1nh2b65idfq7vwyajqi2p38dkhy0c0-source/configuration.nix:154:6:
      153|      nitch
      154|      noctalia-shell
         |      ^
      155|      helix
┏━ 1 Errors:⋮┃              |             ^┃          1697|           else┃┃        … while evaluating the attribute ‘value’┃          at /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/lib/modules.nix:1118:7:┃          1117|     // {┃          1118|       value = addErrorContext "while evaluating the option ${showOption loc}':" val… ┃              |       ^ ┃          1119|       inherit (res.defsFinal') highestPrio; ┃  ┃        … while evaluating the option system.build.toplevel’:┃┃        … while evaluating definitions from /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixo… ┃  ┃        … while evaluating the option system.systemBuilderArgs’:┃┃        … while evaluating definitions from /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixo… ┃  ┃        … while evaluating the option system.activationScripts.etc.text’:┃┃        … while evaluating definitions from /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixo… ┃  ┃        … while evaluating definitions from /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/nixo…┃┃        … while evaluating the option environment.etc.dbus-1.source': ┃  ┃        … while evaluating the option environment.systemPackages’:┃┃        … while evaluating definitions from `/nix/store/hv1nh2b65idfq7vwyajqi2p38dkhy0c0-source/conf…┃┃        (stack trace truncated; use ‘–show-trace’ to show the full, detailed trace)┃┃        error: undefined variable ‘noctalia-shell’┃        at /nix/store/hv1nh2b65idfq7vwyajqi2p38dkhy0c0-source/configuration.nix:154:6:┃           153|      nitch┃           154|      noctalia-shell┃              |      ^┃           155|      helix┣━━━┗━ ∑ ⚠ Exited with 1 errors reported by nix at 12:55:34 after 7sError:0: Failed to build configuration1: Command exited with status Exited(1)
Location:src/commands.rs:693

Any help appreciated.

This is likely because your NixOS configuration is being built using the Nixpkgs version locked in your flake inputs, as opposed to your channels. Flake-based NixOS systems often run with channels disabled, to prevent these inconsistencies.

Try running nix flake update on your flake repository, and building again. Make sure that in your flake inputs, nixpkgs is set to nixpkgs/nixos-unstable or github:NixOS/nixpkgs/nixos-unstable.

Thank-you for your reply I have fixed to issue I changed my flake.nix to.

{
2 │ description = “A simple NixOS flake”;
3 │
4 │ inputs = {
5 │ # NixOS official package source, using the nixos-25.05 branch here
6 │ nixpkgs.url = “github:NixOS/nixpkgs/nixos-unstable”;
7 │ };
8 │
9 │ outputs = { self, nixpkgs }: {
10 │ # Please replace my-nixos with your hostname
11 │ nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
12 │ system = “x86_64-linux”;
13 │ modules = [
14 │ # Import the previous configuration.nix we used,
15 │ # so the old configuration file still takes effect
16 │ ./configuration.nix
17 │ ];
18 │ };
19 │ };
20 │ }

I changed nixpkgs.url to nixpkgs-unstable.url this allowed me to update my system to the unstable branch.