Cant upgrade to unstable 26.05

My Nixos is working fine on the stable channel 26.06 but I want to use the latest versions of some programs.

My config:

  • system: "x86_64-linux"
  • host os: Linux 6.18.38, NixOS, 26.05 (Yarara), 26.05.4494.74cc63f702f7
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.7
  • channels(root): "musnix, nixos"
  • nixpkgs: /nix/store/lm3divzy67b3vgv2s3xrdcskhddkjxc6-nixos/nixos

Where it may differ from the norm:

{
  boot.kernelParams = [ "ibt=off" ];
  services.xserver.videoDrivers = [ "nvidia" ];
  hardware.nvidia = {
    modesetting.enable = true;
    powerManagement.enable = true;
    open = false;
    nvidiaSettings = true;
    package = config.boot.kernelPackages.nvidiaPackages.legacy_580;
    prime = {
      intelBusId = "PCI:0:2:0";
      nvidiaBusId = "PCI:1:0:0";
      offload = {
        enable = true;
        enableOffloadCmd = true;
      };
    };
  };
}

I have commented out this pin

config.boot.kernelPackages.nvidiaPackages.legacy_580

But it doesn’t make any difference.

When I upgrade I get:

autoFixElfFiles: using addDriverRunpath to fix /nix/store/gbii7w1ixxg7slwc1lnlvvz80p25b5f0-cuda12.9-cuda_sanitizer_api-12.9.79/compute-sanitizer/TreeLauncherSubreaper
Running phase: installCheckPhase
no Makefile or custom installCheckPhase, doing nothing
building ‘/nix/store/03g5r3k0iqd6yc791z10s8c79yh4lnbv-libcusparse-linux-x86_64-12.5.10.65-archive.tar.xz.drv’…
structuredAttrs is enabled

trying https://developer.download.nvidia.com/compute/cuda/redist/libcusparse/linux-x86_64/libcusparse-linux-x86_64-12.5.10.65-archive.tar.xz
% Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
Dload  Upload  Total   Spent   Left   Speed
2 46.87M   2  1.03M   0      0   9079      0 1:30:14   02:00 1:28:14      0
curl: (56) OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Retrying in 4 seconds. 1 retry left.
0 885.3M   0 349.0k   0      0   2987      0 86h 20m   01:59 86h 18m      0
curl: (56) OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Retrying in 4 seconds. 1 retry left.
1 108.5M   1  1.93M   0      0  16912      0 1:52:08   02:00 1:50:08      0
curl: (56) OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Retrying in 4 seconds. 1 retry left.
3 45.40M   3  1.78M   0      0  13671      0   58:02   02:17   55:45      0
curl: (56) OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Retrying in 4 seconds. 1 retry left.
0 380.4M   0 700.5k   0      0   5948      0 18h 37m   02:00 18h 35m      0
curl: (56) OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Retrying in 1 second. 3 retries left.
0 308.6M   0  98304   0      0    757      0  4d 22h   02:09  4d 22h      0
curl: (56) OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Retrying in 2 seconds. 2 retries left.
9 45.83M   9  4.49M   0      0  39304      0   20:22   01:59   18:23      0
curl: (56) OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
error: cannot download cuda_gdb-linux-x86_64-12.9.79-archive.tar.xz from any mirror
error: Cannot build ‘/nix/store/p1jayyl2mv1bpkbd2bj3x3snd4y4pzr9-cuda_gdb-linux-x86_64-12.9.79-archive.tar.xz.drv’.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/5wyjmjwc404bj4qjm4pr53p392qbmmw3-cuda_gdb-linux-x86_64-12.9.79-archive.tar.xz
building ‘/nix/store/2sa212a6qab6p6h51vsnlvn2qldb1nmm-libnpp-linux-x86_64-12.4.1.87-archive.tar.xz.drv’…
error: Cannot build ‘/nix/store/6ng5zi2sdzixpdhs8hz0jmz21yv5c6f3-cuda_gdb-12.9.79-source.drv’.
Reason: 1 dependency failed.
Output paths:
/nix/store/5gvjb8iqar1z98ly0ra060chmaqmppnk-cuda_gdb-12.9.79-source
error: Cannot build ‘/nix/store/y1lmqf2kv6ahmhgv2n627yznr37wvshw-cuda12.9-cuda_gdb-12.9.79.drv’.
Reason: 1 dependency failed.
Output paths:
/nix/store/anyfp3dpr290wzm85ad3rqrfjiq1ld6s-cuda12.9-cuda_gdb-12.9.79-bin
/nix/store/ciy6321j6201rpxy825r53d83bxc2kxh-cuda12.9-cuda_gdb-12.9.79
error: Cannot build ‘/nix/store/s31nkkg5y6z414sfa5iaidrrj694l26c-cuda-merged-12.9.drv’.
Reason: 1 dependency failed.
Output paths:
/nix/store/kjwprsaj8y6p787i1svwrf81a6551w2b-cuda-merged-12.9
building ‘/nix/store/b40qkz2jfwz4yiwi72k26cais6bxd2ci-nvtop-3.3.2.drv’…
error: Cannot build ‘/nix/store/h50y08brrpvmb5pjw7nnfdqdid9w60f3-system-path.drv’.
Reason: 1 dependency failed.
Output paths:
/nix/store/5g48519fvfsm1l7vvvvh50d5q02ikjjx-system-path
error: Cannot build ‘/nix/store/rlz47xxfrx9k29imc8rlq99vxa6bapfi-nixos-system-dog-26.11pre1031299.0bb7ec54c848.drv’.
Reason: 1 dependency failed.
Output paths:
/nix/store/gc2l0injdk84gnfgll1p8zhym0s7dzzb-nixos-system-dog-26.11pre1031299.0bb7ec54c848
Command ‘nix-build ‘<nixpkgs/nixos>’ --attr config.system.build.toplevel --no-out-link’ returned non-zero exit status 1.

This is a quite common issue with non open source packages. These packages can’t be downloaded on nixos servers, for copyright reasons, so they are downloaded during buildtime. There might be something wrong with the nvidia download. Maybe try setting open = true (not sure if that is possible your card might be too old to be supported by the open drivers) or just retrying later.

In this case it has nothing to do with the nvidia drivers; the failing download is a CUDA library:

Looks like a networking issue, you might be rate limited or subject to a geoblock.

While it’s generally true that proprietary software cannot be redistributed, and is therefore not cached by hydra, the NixOS community does have a CUDA-specific cache which redistributes CUDA-based packages (and I think officially got approval from NVIDIA to do so): https://cache.nixos-cuda.org/

Using that cache will dramatically speed up your builds, and prevents issues like this one because you’re downloading fully-built binaries and don’t need to hit the vendor’s source repo.

Alternatively, you can just not use CUDA.


As for your nvidia config, it could use some small changes.

The ibt=off thing is actively harmful; NixOS automatically enables it for kernel/driver combos that need it, yours does not.

The prime config probably does nothing, since wayland compositors do not use the X11 prime config.

The driver branch/openness makes sense, but only for specific GPUs. Make sure you know which model you’re using, and double check that it requires this specific combo. Ideally you’d use the latest open driver, but that only works for Turing or newer cards (and if you have one of those, you’d ideally also use powerManagement.finegrained.enable). I’d suggest leaving a comment with your GPU’s model name next to the config block for this.

You also have some redundant settings, which I consider harmful because it prevents upstream from doing maintenance for you. I’d suggest replacing your stuff with this config:

{
  services.xserver.videoDrivers = [ "nvidia" ];

  hardware.nvidia = {
    # Depending on your GPU model; this would be correct for e.g. a Maxwell GPU
    open = false;
    branch = "legacy_580";

    # Fixes suspend
    powerManagement.enable = true;

    prime = {
      # Note that these bus IDs will *not* be used by wayland
      # compositors, nor will any of the other config.
      #
      # This is only needed to install the `nvidia-offload` command,
      # as well as get rid of an assertion that disallows using 
      # `powerManagement.finegrained` on non-offload setups.
      intelBusId = "PCI:0:2:0";
      nvidiaBusId = "PCI:1:0:0";
      offload = {
        enable = true;
        enableOffloadCmd = true;
      };
    };
  };
}
1 Like

Thank you! For nvidia tips etc.

I removed cuda but found another issue the latest version of freecad doesnt build. After removing both cuda and freecad I coud upgrade nix etc.

But I woul like to use cuda: how do I get this to work? I dont understand about the cache and how to set that up? Ah just seen the web site https://cache.nixos-cuda.org/ I’ll follow that..