Nvidia driver 565.77 linux 6.6.74 failed this morning

I’ve been experiencing some oddities around nvidia (I know) drivers. Most of the time it works fine, but every few updates it will fail to compile. My only solution so far is to “wait” and do an update later when (I guess) some patch fixes it. I’d like to understand this failure more though and why it happens. My running system is already on Linux 6.6.74 and nvidia 565.77 - so I’m not quite sure why it’s rebuilding them (I guess the nixos-system-nixos package?)

Still learning and liking NixOS as my desktop OS - just trying to figure out why these failures are happening when the divers/kernel/modules seem to be the same version as what is running.

New to NixOS but not to linux - if there’s anything else I can provide to help understand these failures please let me know.

hardware.graphics.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
  open = false;
  modesetting.enable = true;
  nvidiaSettings = true;
};
sudo nixos-rebuild switch --upgrade
unpacking 1 channels...
building Nix...
building the system configuration...
these 40 derivations will be built:
/nix/store/2bppr6jqvx8nvacxzjwsn1phx6lxnh73-nvidia-x11-565.77-6.6.74.drv
/nix/store/05dbnsdxx6siki5hk8rvcfzsnmn0202c-steam-run-fhsenv-rootfs.drv
/nix/store/c2nch7vf0gr9hr9187pp5bzyniykc2vy-linux-6.6.74-modules.drv
/nix/store/qm5ckdl6ma5fv6grx219a6qh21pv72sd-firmware.drv
/nix/store/71i5n6lxpivl5gm80z5fl0wrmybx8f2x-linux-6.6.74-modules-shrunk.drv
/nix/store/0nr94i5wb16gvr6yip695b14j6bvj7wl-initrd-linux-6.6.74.drv
/nix/store/m2s5iq577sm4zyslj9sksdix9bsg28sj-nvidia-settings-565.77.drv
/nix/store/9ij4qc82441jilcqandr0110gapmrqws-steam-fhsenv-rootfs.drv
/nix/store/ryhsxv187hhy440blw9j2qgnxv5dzfay-steam-bwrap.drv
/nix/store/nzrpbpb9v2vzglp3s7xmlp2j56k46zaj-steam.drv
/nix/store/77dv1fni0cmf8k021590s800912k4ya6-steam-run-bwrap.drv
/nix/store/qzqqayq0f5adnq47ia0yffm2pknfml4p-steam-run.drv
/nix/store/gbq685n7hkppzap4fb8yi6g99jyskicm-system-path.drv
/nix/store/9mc5knwa8di9bk8bf19svh0k7nwr0kxx-dbus-1.drv
/nix/store/z92pwngc3ajs1j18pchplcriji1bnyad-X-Restart-Triggers-dbus.drv
/nix/store/2y81c022ip89gwgrsil0y2n3lcdq8109-unit-dbus.service.drv
/nix/store/5v099a3q139hdq01nw984hrvcvpvm2k3-user-environment.drv
/nix/store/9bzq701ahn69lazp1v4fw33c5hm8ak9y-xserver.conf.drv
/nix/store/dhxgqmb8yqwmib5i62w1qvpzr11z5sjn-xserver-wrapper.drv
/nix/store/8y6bj2h2wxl670y3y2f6cim4gzgvbswd-sddm.conf.drv
/nix/store/c74hskz5kfz1vmq6wyhbf0ipq8rf4b0a-set-environment.drv
/nix/store/94mxk1igq8dkszz1jn3y9b971mb2426q-etc-zshenv.drv
/nix/store/5ny6m7cikpgl5l4zlvda8fx598fzflan-graphics-drivers.drv
/nix/store/gib679d0dix5qx9j6wj4payjkai67ypa-graphics-drivers-32bit.drv
/nix/store/xn3yq160mzbb30kapqsl254v5fynwyw7-graphics-driver.conf.drv
/nix/store/bak5cdn7rh1grdsnm48ka2649wlzhx60-tmpfiles.d.drv
/nix/store/i3rqv1f9d9rsjln0cb2wxvpn9nz7c9h2-etc-pam-environment.drv
/nix/store/mxhr1892nvhiqgx87j2gyfc7w52hakpf-etc-modprobe.d-firmware.conf.drv
/nix/store/9gmh2s8wgjz3x5v8mpm5z591q7vwzrp9-unit-accounts-daemon.service.drv
/nix/store/i464c4nllvvrrkv343wgpd08ppdxl8x2-X-Restart-Triggers-systemd-tmpfiles-resetup.drv
/nix/store/v90pcsr15l9zhvcnrqakhfz7pv01283p-unit-systemd-tmpfiles-resetup.service.drv
/nix/store/wdl3xk4ickshd6b6zv33xy1n66k7iwz6-unit-dbus.service.drv
/nix/store/c7m7zk3yq2iphk1b9mlwpfg3fvjhg9cq-X-Restart-Triggers-polkit.drv
/nix/store/yrkayw0wpcl0a00pzwam4nqlq1ibcc31-unit-polkit.service.drv
/nix/store/nr9483grrs134k7r10w2b8cvslnswbln-system-units.drv
/nix/store/p8cbn1s77xjd336mamvqlwn8vy29wqj7-user-units.drv
/nix/store/v09ky0rpnpwc8g6kh4sfckpz22hgx0nf-etc-profile.drv
/nix/store/4znhcg3r38m4h6q07zzx2yc7098fc8k9-etc.drv
/nix/store/9im812a2vvpkiycxn7pln66wf7xj8fqg-boot.json.drv
/nix/store/qyia7amv9v0fcrhfmbgpgbfl3fzsydqn-nixos-system-nixos-24.11.714033.f6687779bf4c.drv
building '/nix/store/5v099a3q139hdq01nw984hrvcvpvm2k3-user-environment.drv'...
building '/nix/store/2bppr6jqvx8nvacxzjwsn1phx6lxnh73-nvidia-x11-565.77-6.6.74.drv'...
created 2422 symlinks in user environment
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
Running phase: unpackPhase
Creating directory NVIDIA-Linux-x86_64-565.77
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 565.77.
source root is NVIDIA-Linux-x86_64-565.77
setting SOURCE_DATE_EPOCH to timestamp 1732753537 of file NVIDIA-Linux-x86_64-565.77/nvidia-bug-report.sh
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
Building linux driver against kernel: /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev
make[1]: Entering directory '/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source'
make[2]: Entering directory '/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/build'
SYMLINK /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-kernel.o
SYMLINK /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-modeset/nv-modeset-kernel.o
CONFTEST: hash__remap_4k_pfn
...
CONFTEST: ib_peer_memory_symbols
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pci.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-dmabuf.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-nano-timer.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-acpi.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-cray.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-dma.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-i2c.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-mmap.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-p2p.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pat.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-procfs.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-usermap.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-vm.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-vtophys.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-mlock.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-pci.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-registry.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-usermap.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-modeset-interface.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pci-table.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-kthread-q.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-memdbg.o
CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-ibmnpu.o
In file included from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/writeback.h:203,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/memcontrol.h:22,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/swap.h:9,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/suspend.h:5,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/regulator/consumer.h:35,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/i2c.h:19,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/uapi/linux/fb.h:6,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/fb.h:7,
from /build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:220,
from /build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-dmabuf.h:27,
from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-dmabuf.c:24:
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h: In function 'bio_segments':
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:8: error: macro "__static_assert" requires 3 arguments, but only 1 given
194 |         bio_for_each_segment(bv, bio, iter)
| ^       ~~~~~~~~~~~~~~~~~
In file included from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/init.h:5,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/io.h:10,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/iosys-map.h:10,
from /nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/dma-buf.h:16,
from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-dmabuf.c:23:
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:78: note: macro "__static_assert" defined here
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
|
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:77:34: error: '__static_assert' undeclared (first use in this function); did you mean 'static_assert'?
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|                                  ^~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 |         static_assert(__types_ok(x, y),                 \
|         ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|                 ^~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
|                                 ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:126:9: note: in expansion of macro 'min_t'
126 |         min_t(unsigned, mp_bvec_iter_len((bvec), (iter)),               \
|         ^~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:136:27: note: in expansion of macro 'bvec_iter_len'
136 |         .bv_len         = bvec_iter_len((bvec), (iter)),        \
|                           ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:26:9: note: in expansion of macro 'bvec_iter_bvec'
26 |         bvec_iter_bvec((bio)->bi_io_vec, (iter))
|         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:148:25: note: in expansion of macro 'bio_iter_iovec'
148 |                 ((bvl = bio_iter_iovec((bio), (iter))), 1);             \
|                         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:152:9: note: in expansion of macro '__bio_for_each_segment'
152 |         __bio_for_each_segment(bvl, bio, iter, (bio)->bi_iter)
|         ^~~~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:9: note: in expansion of macro 'bio_for_each_segment'
194 |         bio_for_each_segment(bv, bio, iter)
|         ^~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:77:34: note: each undeclared identifier is reported only once for each function it appears in
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|                                  ^~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 |         static_assert(__types_ok(x, y),                 \
|         ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|                 ^~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
|                                 ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:126:9: note: in expansion of macro 'min_t'
126 |         min_t(unsigned, mp_bvec_iter_len((bvec), (iter)),               \
|         ^~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:136:27: note: in expansion of macro 'bvec_iter_len'
136 |         .bv_len         = bvec_iter_len((bvec), (iter)),        \
|                           ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:26:9: note: in expansion of macro 'bvec_iter_bvec'
26 |         bvec_iter_bvec((bio)->bi_io_vec, (iter))
|         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:148:25: note: in expansion of macro 'bio_iter_iovec'
148 |                 ((bvl = bio_iter_iovec((bio), (iter))), 1);             \
|                         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:152:9: note: in expansion of macro '__bio_for_each_segment'
152 |         __bio_for_each_segment(bvl, bio, iter, (bio)->bi_iter)
|         ^~~~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:9: note: in expansion of macro 'bio_for_each_segment'
194 |         bio_for_each_segment(bv, bio, iter)
|         ^~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:77:54: warning: left-hand operand of comma expression has no effect []
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|                                                      ^
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 |         static_assert(__types_ok(x, y),                 \
|         ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|                 ^~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
|                                 ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:126:9: note: in expansion of macro 'min_t'
126 |         min_t(unsigned, mp_bvec_iter_len((bvec), (iter)),               \
|         ^~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:136:27: note: in expansion of macro 'bvec_iter_len'
136 |         .bv_len         = bvec_iter_len((bvec), (iter)),        \
|                           ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:26:9: note: in expansion of macro 'bvec_iter_bvec'
26 |         bvec_iter_bvec((bio)->bi_io_vec, (iter))
|         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:148:25: note: in expansion of macro 'bio_iter_iovec'
148 |                 ((bvl = bio_iter_iovec((bio), (iter))), 1);             \
|                         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:152:9: note: in expansion of macro '__bio_for_each_segment'
152 |         __bio_for_each_segment(bvl, bio, iter, (bio)->bi_iter)
|         ^~~~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:9: note: in expansion of macro 'bio_for_each_segment'
194 |         bio_for_each_segment(bv, bio, iter)
|         ^~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:77:69: warning: left-hand operand of comma expression has no effect []
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|                                                                     ^
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 |         static_assert(__types_ok(x, y),                 \
|         ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|                 ^~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
|                                 ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:126:9: note: in expansion of macro 'min_t'
126 |         min_t(unsigned, mp_bvec_iter_len((bvec), (iter)),               \
|         ^~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:136:27: note: in expansion of macro 'bvec_iter_len'
136 |         .bv_len         = bvec_iter_len((bvec), (iter)),        \
|                           ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:26:9: note: in expansion of macro 'bvec_iter_bvec'
26 |         bvec_iter_bvec((bio)->bi_io_vec, (iter))
|         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:148:25: note: in expansion of macro 'bio_iter_iovec'
148 |                 ((bvl = bio_iter_iovec((bio), (iter))), 1);             \
|                         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:152:9: note: in expansion of macro '__bio_for_each_segment'
152 |         __bio_for_each_segment(bvl, bio, iter, (bio)->bi_iter)
|         ^~~~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:9: note: in expansion of macro 'bio_for_each_segment'
194 |         bio_for_each_segment(bv, bio, iter)
|         ^~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:77:76: error: expected ';' before ')' token
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|                                                                            ^
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 |         static_assert(__types_ok(x, y),                 \
|         ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|                 ^~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
|                                 ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:126:9: note: in expansion of macro 'min_t'
126 |         min_t(unsigned, mp_bvec_iter_len((bvec), (iter)),               \
|         ^~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:136:27: note: in expansion of macro 'bvec_iter_len'
136 |         .bv_len         = bvec_iter_len((bvec), (iter)),        \
|                           ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:26:9: note: in expansion of macro 'bvec_iter_bvec'
26 |         bvec_iter_bvec((bio)->bi_io_vec, (iter))
|         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:148:25: note: in expansion of macro 'bio_iter_iovec'
148 |                 ((bvl = bio_iter_iovec((bio), (iter))), 1);             \
|                         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:152:9: note: in expansion of macro '__bio_for_each_segment'
152 |         __bio_for_each_segment(bvl, bio, iter, (bio)->bi_iter)
|         ^~~~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:9: note: in expansion of macro 'bio_for_each_segment'
194 |         bio_for_each_segment(bv, bio, iter)
|         ^~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:77:76: error: expected statement before ')' token
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|                                                                            ^
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 |         static_assert(__types_ok(x, y),                 \
|         ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|                 ^~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
|                                 ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:126:9: note: in expansion of macro 'min_t'
126 |         min_t(unsigned, mp_bvec_iter_len((bvec), (iter)),               \
|         ^~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:136:27: note: in expansion of macro 'bvec_iter_len'
136 |         .bv_len         = bvec_iter_len((bvec), (iter)),        \
|                           ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:26:9: note: in expansion of macro 'bvec_iter_bvec'
26 |         bvec_iter_bvec((bio)->bi_io_vec, (iter))
|         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:148:25: note: in expansion of macro 'bio_iter_iovec'
148 |                 ((bvl = bio_iter_iovec((bio), (iter))), 1);             \
|                         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:152:9: note: in expansion of macro '__bio_for_each_segment'
152 |         __bio_for_each_segment(bvl, bio, iter, (bio)->bi_iter)
|         ^~~~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:9: note: in expansion of macro 'bio_for_each_segment'
194 |         bio_for_each_segment(bv, bio, iter)
|         ^~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/build_bug.h:77:69: warning: statement with no effect []
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|                                                                     ^
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 |         static_assert(__types_ok(x, y),                 \
|         ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|                 ^~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
|                                 ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:126:9: note: in expansion of macro 'min_t'
126 |         min_t(unsigned, mp_bvec_iter_len((bvec), (iter)),               \
|         ^~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bvec.h:136:27: note: in expansion of macro 'bvec_iter_len'
136 |         .bv_len         = bvec_iter_len((bvec), (iter)),        \
|                           ^~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:26:9: note: in expansion of macro 'bvec_iter_bvec'
26 |         bvec_iter_bvec((bio)->bi_io_vec, (iter))
|         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:148:25: note: in expansion of macro 'bio_iter_iovec'
148 |                 ((bvl = bio_iter_iovec((bio), (iter))), 1);             \
|                         ^~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:152:9: note: in expansion of macro '__bio_for_each_segment'
152 |         __bio_for_each_segment(bvl, bio, iter, (bio)->bi_iter)
|         ^~~~~~~~~~~~~~~~~~~~~~
/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/include/linux/bio.h:194:9: note: in expansion of macro 'bio_for_each_segment'
194 |         bio_for_each_segment(bv, bio, iter)
|         ^~~~~~~~~~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-mmap.c:321:5: warning: conflicting types for 'nv_encode_caching' due to enum/integer mismatch; have 'int(pgprot_t *, NvU32,  nv_memory_type_t)' {aka 'int(struct pgprot *, unsigned int,  nv_memory_type_t)'} []
321 | int nv_encode_caching(
|     ^~~~~~~~~~~~~~~~~
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:1791,
from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-mmap.c:27:
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-proto.h:44:13: note: previous declaration of 'nv_encode_caching' with type 'int(pgprot_t *, NvU32,  NvU32)' {aka 'int(struct pgprot *, unsigned int, unsigned int)'}
44 | int         nv_encode_caching           (pgprot_t *, NvU32, NvU32);
|             ^~~~~~~~~~~~~~~~~
make[4]: *** [/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/scripts/Makefile.build:243: /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-dmabuf.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/Makefile:1921: /build/NVIDIA-Linux-x86_64-565.77/kernel] Error 2
make[2]: *** [/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source/Makefile:234: __sub-make] Error 2
make[2]: Leaving directory '/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/build'
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/nix/store/9jicgm3f52n8bixs7v7m9i1cw4fly720-linux-6.6.74-dev/lib/modules/6.6.74/source'
make: *** [Makefile:115: modules] Error 2
error: builder for '/nix/store/2bppr6jqvx8nvacxzjwsn1phx6lxnh73-nvidia-x11-565.77-6.6.74.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/4znhcg3r38m4h6q07zzx2yc7098fc8k9-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qm5ckdl6ma5fv6grx219a6qh21pv72sd-firmware.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c2nch7vf0gr9hr9187pp5bzyniykc2vy-linux-6.6.74-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gbq685n7hkppzap4fb8yi6g99jyskicm-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qyia7amv9v0fcrhfmbgpgbfl3fzsydqn-nixos-system-nixos-24.11.714033.f6687779bf4c.drv' failed to build

The “waiting” worked again just now - between about 10AM Central US and 11:15AM Central US nvidia wouldnt build - now it does. I compared the nixhash of both runs and they are exactly the same. This is weird/confusing to me.

hello and welcome.
First of all you can try different branches of nvidia drivers with this:

hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;

https://nixos.wiki/wiki/Nvidia#Determining_the_Correct_Driver_Version

Second of all it is rather normal that failures like this happen. Sometimes there are workarounds and sometimes there are not.
I would recommend that you update your kernel to atleast 6.12 when using the beta branch of nvidia drivers:

boot.kernelPackages = pkgs.linuxPackages_6_12;#or _latest for the newest kernel 

ok that is strange can you provide some system infos like cpu …
Also does this happen only on Kernel 6.6 or has this happend on older versions too?

hey! thanks for the reply and the warm welcome - I understand that config and may try to update - but my question is more so why is there a period of time I’m hitting where I can build and run stable (for weeks) then when an update happens there’s a window where the system is unbuildable… till it is with no packages/hashes changed.

Whoops looks like we both replied about the same time, here’s the info requested:

I’ve only been on the 24.11 release so I believe it’s been 6.6 the entire time. Using this as my primary machine so wanted to keep the “base” vanilla/stable.

HW:
OS: NixOS 24.11.714033.f6687779bf4c (Vicuna
Host: Gigabyte Technology Co., Ltd. X570 AO
Kernel: 6.6.74
Uptime: 1 day, 3 hours, 55 mins
Packages: 1697 (nix-system), 1774 (nix-user
Shell: zsh 5.9
Resolution: 3840x2160, 2560x1440
DE: Plasma 6.2.5 (Wayland)
WM: kwin
Icons: breeze-dark [GTK2/3]
Terminal: ghostty
CPU: AMD Ryzen 9 3900X (24) @ 3.800GHz
GPU: NVIDIA GeForce RTX 2080 Rev. A
Memory: 6889MiB / 32012MiB

And yes it is strange - I did expect 1 package hash to change between my waiting period but it didn’t, which is very confusing.

edit: here’s the full 50k line output of the successful build I did remove ghostty but i had already removed that in previous attempts as well, and I added it back right after and it was fine) gist:ce3e999e69374aa5bb8cba3c3b11700a · GitHub

Ok I have some more questions:

  1. Does this happen with other packages/drivers too
  2. What do you mean with:
  1. Have you changed anything on the system berfore the period of “unbuildingness” starts

Can you also pleas try a newer Version of the Kernel, so that we can rule out that the Kernel Version is causing this problem. If you get problems with the Kernel you can do a rollback.

  1. No just seems to be nvidia - i always was thinking it was a config issue so I’d spend time messing with the driver settings - but I think the resolution was always time now (I’ll track this more closely going forward)

  2. Maybe more accurately there’s a window where the system is not updateable.

  3. No, I was just wanting to update to Ghostty to 1.1.0 so I added to configuration.nix it and ran sudo nixos-rebuild switch --upgrade - which brought in a bunch of other things to update. Nvidia build failed till time passed, then it succeeded. Again I’ll watch this more closely but I usually only run --upgrade when I see a release of something new I want or ~weekly to keep up to date with any patches.

Will try the 6.12 kernel in a bit – though it’s building fine as time passed and now it works on 6.6.

1 Like

Ok, this is interesting and even more confusing to me - with this diff to configuration.nix

25d24
<     package = config.boot.kernelPackages.nvidiaPackages.beta;
164d162
<   boot.kernelPackages = pkgs.linuxPackages_6_12;

I get a very similar build error… I wonder if it’ll build in 1.5 hours…

$ sudo nixos-rebuild switch --upgrade
unpacking 1 channels...
building Nix...
building the system configuration...
these 39 derivations will be built:
  /nix/store/fcgy10a8x2hx4npm23i7c2f0wm24ynzk-nvidia-x11-565.77-6.12.11.drv
  /nix/store/7bcghfsr9adqbl8pdygspr062q4ca96k-linux-6.12.11-modules.drv
  /nix/store/mc6k6zksms0qkjspjbnljgnzjj7693x3-steam-fhsenv-rootfs.drv
  /nix/store/7qbadwzrlyjpfcbcc6vvcx7qdb1rqwns-steam-bwrap.drv
  /nix/store/4wlh1x0jd2f1ymzpz5yc3qyqahisr18a-steam.drv
  /nix/store/43mfyzbakfwb4x9ylb4ycvqvjyz7ky6z-steam-run-fhsenv-rootfs.drv
  /nix/store/n9ckapxin3r48ajhw9754mpzfa9h8w7l-steam-run-bwrap.drv
  /nix/store/h5z4ixavfwh8dws0szm01l9dxda2srzh-steam-run.drv
  /nix/store/xpnhcrn97gg644hwx30mi29i0bgk914v-nvidia-settings-565.77.drv
  /nix/store/bybv5mmnky2pniy0jw8cv60il44pqp2i-system-path.drv
  /nix/store/l7rj5bmwxr8bhya8yk1k36fvlsxky64m-firmware.drv
  /nix/store/6x623f7z4598xjfr2912h675jh3785lw-linux-6.12.11-modules-shrunk.drv
  /nix/store/mhyx39vr0x1mfs8swvw3k9kb4s8dp1wp-initrd-linux-6.12.11.drv
  /nix/store/jpfgfffjr1b99pzdwranirh7i1fkfdkd-boot.json.drv
  /nix/store/1w6d3jgvmv4yyj13pjjvm9xw29la811s-etc-pam-environment.drv
  /nix/store/k54sdym4f57rh2ivyzwshbcwhpyjprvy-xserver.conf.drv
  /nix/store/630dz67hxs4jnpjbiknjipljgmgc3mxi-xserver-wrapper.drv
  /nix/store/3504p56ric303g0rr2yfqgiykn821nid-sddm.conf.drv
  /nix/store/q7azybl8df6fch50vijk0ia843bfsbr7-set-environment.drv
  /nix/store/6qxla20kq50pf0ywzxlkgx820gl7zbq8-etc-zshenv.drv
  /nix/store/bd89vs7xqinfkcm8v4s467y8x0w0xwd4-unit-accounts-daemon.service.drv
  /nix/store/v7hxz8nidilrc2lvmnmf67j6ycsdh828-dbus-1.drv
  /nix/store/82kx4fz02b5k7fxdkqyj9wl1hya6axgh-X-Restart-Triggers-dbus.drv
  /nix/store/c761qp0w951zxh6ibwy6b5xrl22khnis-unit-dbus.service.drv
  /nix/store/7xprx6vr5gghhkn8nlliqs7da08i7cba-X-Restart-Triggers-polkit.drv
  /nix/store/dpn22ivdy2wc7pzvh3s87fr8pkz5rkch-unit-polkit.service.drv
  /nix/store/lkmq5srrm4w8mn5qajb6fz7jzwcrynkj-graphics-drivers-32bit.drv
  /nix/store/rhsb09vjzxmiw68zfgdl7jf7fpkkwpvq-graphics-drivers.drv
  /nix/store/kbk3mv91r6lrgxg0r5nc2vmj6a0hd5cx-graphics-driver.conf.drv
  /nix/store/kcczzbv8z94g43aqywdzfffi2ylx2nq3-tmpfiles.d.drv
  /nix/store/q18j9iwbq7k4jngn2vvd0r66ghn5dp2s-X-Restart-Triggers-systemd-tmpfiles-resetup.drv
  /nix/store/qxr527mywk7273nfmjc8f0fdd52x9261-unit-systemd-tmpfiles-resetup.service.drv
  /nix/store/6v62f9wc4nava58vhaskxpcf47flv3wd-system-units.drv
  /nix/store/aaaj4dzxqp8y54lk0rhk3jw8k543b87p-etc-profile.drv
  /nix/store/rs01c3dpagz0jlys0v4jq9395v87vvjc-etc-modprobe.d-firmware.conf.drv
  /nix/store/8d5fd3z22xpziy6mwh11cz7jazgwsqnk-unit-dbus.service.drv
  /nix/store/sih2c1vjgy6848f1y2lz49qxg1cqrm1g-user-units.drv
  /nix/store/nb7463zb4pnrph7byinlgi83bh6jy742-etc.drv
  /nix/store/0manq07c8q7fafdmlw2z6mjzy5bp9l5d-nixos-system-nixos-24.11.714033.f6687779bf4c.drv
building '/nix/store/fcgy10a8x2hx4npm23i7c2f0wm24ynzk-nvidia-x11-565.77-6.12.11.drv'...
Running phase: unpackPhase
Creating directory NVIDIA-Linux-x86_64-565.77
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 565.77
source root is NVIDIA-Linux-x86_64-565.77
setting SOURCE_DATE_EPOCH to timestamp 1732753537 of file NVIDIA-Linux-x86_64-565.77/nvidia-bug-report.sh
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
Building linux driver against kernel: /nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev
make[1]: Entering directory '/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/source'
make[2]: Entering directory '/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/build'
  SYMLINK /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-kernel.o
  SYMLINK /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-modeset/nv-modeset-kernel.o
 CONFTEST: hash__remap_4k_pfn
...
 CONFTEST: ib_peer_memory_symbols
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pci.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-dmabuf.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-nano-timer.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-acpi.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-cray.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-dma.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-i2c.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-mmap.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-p2p.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pat.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-procfs.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-usermap.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-vm.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-vtophys.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-mlock.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-pci.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-registry.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-usermap.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-modeset-interface.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pci-table.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-kthread-q.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-memdbg.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-ibmnpu.o
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-nano-timer.c:31:
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-nano-timer.c: In function 'nv_alloc_nano_timer':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-nano-timer.c:86:5: note: in expansion of macro 'NV_KMALLOC'
   86 |     NV_KMALLOC(nv_nstimer, sizeof(nv_nano_timer_t));
      |     ^~~~~~~~~~
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-procfs.c:27:
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-procfs.c: In function 'nv_procfs_open_file':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:579:37: warning: suggest braces around empty body in an 'if' statement []
  579 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-procfs.c:273:5: note: in expansion of macro 'NV_KZALLOC'
  273 |     NV_KZALLOC(nvpp, sizeof(nv_procfs_private_t));
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-mmap.c:321:5: warning: conflicting types for 'nv_encode_caching' due to enum/integer mismatch; have 'int(pgprot_t *, NvU32,  nv_memory_type_t)' {aka 'int(struct pgprot *, unsigned int,  nv_memory_type_t)'} []
  321 | int nv_encode_caching(
      |     ^~~~~~~~~~~~~~~~~
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:1791,
                 from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-mmap.c:27:
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-proto.h:44:13: note: previous declaration of 'nv_encode_caching' with type 'int(pgprot_t *, NvU32,  NvU32)' {aka 'int(struct pgprot *, unsigned int,  unsigned int)'}
   44 | int         nv_encode_caching           (pgprot_t *, NvU32, NvU32);
      |             ^~~~~~~~~~~~~~~~~
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:34:
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c: In function 'nvos_create_alloc':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:579:37: warning: suggest braces around empty body in an 'if' statement []
  579 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:292:5: note: in expansion of macro 'NV_KZALLOC'
  292 |     NV_KZALLOC(at, sizeof(nv_alloc_t));
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c: In function 'nv_alloc_file_private':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:579:37: warning: suggest braces around empty body in an 'if' statement []
  579 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:980:5: note: in expansion of macro 'NV_KZALLOC'
  980 |     NV_KZALLOC(nvlfp, sizeof(nv_linux_file_private_t));
      |     ^~~~~~~~~~
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-report-err.o
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-pci.h:28,
                 from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pci.c:26:
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pci.c: In function 'nv_pci_probe':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:579:37: warning: suggest braces around empty body in an 'if' statement []
  579 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-pci.c:401:5: note: in expansion of macro 'NV_KZALLOC'
  401 |     NV_KZALLOC(nvl, sizeof(nv_linux_state_t));
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c: In function 'nvidia_ioctl':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:2393:5: note: in expansion of macro 'NV_KMALLOC'
 2393 |     NV_KMALLOC(arg_copy, arg_size);
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:2496:13: note: in expansion of macro 'NV_KMALLOC'
 2496 |             NV_KMALLOC(nvlfp->attached_gpus, arg_size);
      |             ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c: In function 'nv_map_guest_pages':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:3133:5: note: in expansion of macro 'NV_KMALLOC'
 3133 |     NV_KMALLOC(pages, sizeof(struct page *) * page_count);
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c: In function 'nv_alloc_kernel_mapping':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:3628:13: note: in expansion of macro 'NV_KMALLOC'
 3628 |             NV_KMALLOC(pages, sizeof(struct page *) * page_count);
      |             ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c: In function 'nv_post_event':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:586:37: warning: suggest braces around empty body in an 'if' statement []
  586 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv.c:3912:9: note: in expansion of macro 'NV_KMALLOC_ATOMIC'
 3912 |         NV_KMALLOC_ATOMIC(nvet, sizeof(nvidia_event_t));
      |         ^~~~~~~~~~~~~~~~~
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-rsync.o
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c:27:
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c: In function 'os_alloc_mem':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:586:37: warning: suggest braces around empty body in an 'if' statement []
  586 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c:608:13: note: in expansion of macro 'NV_KMALLOC_ATOMIC'
  608 |             NV_KMALLOC_ATOMIC(*address, alloc_size);
      |             ^~~~~~~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:601:37: warning: suggest braces around empty body in an 'if' statement []
  601 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c:614:13: note: in expansion of macro 'NV_KMALLOC_NO_OOM'
  614 |             NV_KMALLOC_NO_OOM(*address, alloc_size);
      |             ^~~~~~~~~~~~~~~~~
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-msi.o
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c: In function 'os_queue_work_item':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:586:37: warning: suggest braces around empty body in an 'if' statement []
  586 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c:1155:5: note: in expansion of macro 'NV_KMALLOC_ATOMIC'
 1155 |     NV_KMALLOC_ATOMIC(oqd, sizeof(os_queue_data_t));
      |     ^~~~~~~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c: In function 'os_alloc_wait_queue':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/os-interface.c:2026:5: note: in expansion of macro 'NV_KMALLOC'
 2026 |     NV_KMALLOC(*wq, sizeof(os_wait_queue));
      |     ^~~~~~~~~~
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps-imex.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-host1x.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv_uvm_interface.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_aead.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_ecc.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_hkdf.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_rand.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_shash.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_rsa.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_aead_aes_gcm.o
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_aead.c:41:5: warning: no previous prototype for 'libspdm_aead_prealloc' []
   41 | int libspdm_aead_prealloc(void **context, char const *alg)
      |     ^~~~~~~~~~~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_aead.c:178:5: warning: no previous prototype for 'libspdm_aead_prealloced' []
  178 | int libspdm_aead_prealloced(void *context,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_sha.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_hmac_sha.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_internal_crypt_lib.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_hkdf_sha.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_ec.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_x509.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/libspdm_rsa_ext.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nvlink_linux.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nvlink_caps.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/linux_nvswitch.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/procfs_nvswitch.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/i2c_nvswitch.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_conf_computing.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_sec2_test.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_maxwell_sec2.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_hopper_sec2.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_blackwell.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_blackwell_fault_buffer.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_blackwell_mmu.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_blackwell_host.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_common.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_linux.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/nvstatus.o
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-msi.h:27,
                 from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-msi.c:24:
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-msi.c: In function 'nv_init_msi':
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/nvCpuUuid.o
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:579:37: warning: suggest braces around empty body in an 'if' statement []
  579 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-msi.c:39:9: note: in expansion of macro 'NV_KZALLOC'
   39 |         NV_KZALLOC(nvl->irq_count, sizeof(nv_irq_count_info_t) * nvl->num_intr);
      |         ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-msi.c: In function 'nv_init_msix':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-msi.c:90:5: note: in expansion of macro 'NV_KMALLOC'
   90 |     NV_KMALLOC(nvl->msix_entries, sizeof(struct msix_entry) * num_intr);
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:579:37: warning: suggest braces around empty body in an 'if' statement []
  579 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-msi.c:102:5: note: in expansion of macro 'NV_KZALLOC'
  102 |     NV_KZALLOC(nvl->irq_count, sizeof(nv_irq_count_info_t) * num_intr);
      |     ^~~~~~~~~~
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/nv-kthread-q.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/nv-kthread-q-selftest.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm.o
In file included from /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c:24:
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c: In function 'nv_cap_procfs_open':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c:435:5: note: in expansion of macro 'NV_KMALLOC'
  435 |     NV_KMALLOC(private, sizeof(nv_cap_file_private_t));
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c: In function 'nv_cap_alloc':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c:635:5: note: in expansion of macro 'NV_KMALLOC'
  635 |     NV_KMALLOC(cap, sizeof(nv_cap_t));
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c:642:5: note: in expansion of macro 'NV_KMALLOC'
  642 |     NV_KMALLOC(cap->path, len);
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c:654:5: note: in expansion of macro 'NV_KMALLOC'
  654 |     NV_KMALLOC(cap->name, len);
      |     ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c: In function 'nv_cap_init':
/build/NVIDIA-Linux-x86_64-565.77/kernel/common/inc/nv-linux.h:572:37: warning: suggest braces around empty body in an 'if' statement []
  572 |             NV_MEMDBG_ADD(ptr, size); \
      |                                     ^
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia/nv-caps.c:759:5: note: in expansion of macro 'NV_KMALLOC'
  759 |     NV_KMALLOC(name, (strlen(path) + strlen(dir)) + 1);
      |     ^~~~~~~~~~
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_tools.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_global.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu_isr.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_procfs.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_va_space.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_va_space_mm.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu_semaphore.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_mem.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_rm_mem.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_channel.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_lock.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_hal.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_processors.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_range_tree.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_rb_tree.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_range_allocator.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_va_range.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_va_range_device_p2p.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_va_policy.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_va_block.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_range_group.o
  CC [M]  /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu_replayable_faults.o
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu.c: In function 'init_procfs_dirs':
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu.c:972:5: warning: ISO C90 forbids variable length array 'uuid_buffer' []
  972 |     char uuid_buffer[max(UVM_PARENT_GPU_UUID_STRING_LENGTH, UVM_GPU_UUID_STRING_LENGTH)];
      |     ^~~~
/build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu.c:973:5: warning: ISO C90 forbids variable length array 'gpu_dir_name' []
  973 |     char gpu_dir_name[sizeof(symlink_name) + sizeof(uuid_buffer) + 1];
      |     ^~~~
make[4]: *** [/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/source/scripts/Makefile.build:229: /build/NVIDIA-Linux-x86_64-565.77/kernel/nvidia-uvm/uvm_gpu_replayable_faults.o] Error 139
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/source/Makefile:1937: /build/NVIDIA-Linux-x86_64-565.77/kernel] Error 2
make[2]: *** [/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/source/Makefile:224: __sub-make] Error 2
make[2]: Leaving directory '/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/build'
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/source'
make: *** [Makefile:115: modules] Error 2
error: builder for '/nix/store/fcgy10a8x2hx4npm23i7c2f0wm24ynzk-nvidia-x11-565.77-6.12.11.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/nb7463zb4pnrph7byinlgi83bh6jy742-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l7rj5bmwxr8bhya8yk1k36fvlsxky64m-firmware.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7bcghfsr9adqbl8pdygspr062q4ca96k-linux-6.12.11-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bybv5mmnky2pniy0jw8cv60il44pqp2i-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0manq07c8q7fafdmlw2z6mjzy5bp9l5d-nixos-system-nixos-24.11.714033.f6687779bf4c.drv' failed to build

It built now just running switch again. Unfortunately Ghostty was not set for unlimited scrollback so I didn’t catch the full output…

There must be some state shared between build attempts of nvidia drivers? eg: something is built then the next build a dirty check of that is incorrect and skips some part of the build?

Is there a way to force clean any temp build artifacts it may have? This seems quite unexpected (to me at least).

you could try to clean the chache or tmp:

nix-collect-garbage
nix-store --gc
1 Like

I don’t think these will work because the build did succeed subsequently and so it is referenced by an old nixos rev on my system. Unfortunately getting to the edge of my understanding here on how to clean up old rev’s that are referenced by this specific kernel.

I got a hard lock up while on 6.12, so back to 6.6.

So every time you do a upgrade, the build fails and when you try it again it works?
Or is it even on normal rebuilds?
Also could you post your configuration.nix?

It seems to be - but I cant 100% reproduce it because of cached builds and referenced nix revs.

configuration.nix

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

let
unstable = import <nixos-unstable> {};
in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
hardware.bluetooth.enable = true;
hardware.bluetooth.settings = {
General = {
FastConnectable = true;
# Experimental = true;
};
};
hardware.logitech.wireless.enable = true;
hardware.logitech.wireless.enableGraphical = true;
# 3d
hardware.graphics.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# package = config.boot.kernelPackages.nvidiaPackages.beta;
open = false;
modesetting.enable = true;
nvidiaSettings = true;
};

nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

# Enable networking
networking.networkmanager.enable = true;

# Set your time zone.
time.timeZone = "America/Chicago";

# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";

i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};

# Enable the X11 windowing system.
services.xserver.enable = true;

# Enable the GNOME Desktop Environment.
# services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.excludePackages = [ pkgs.xterm ];

# Enable KDE
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;
# https://github.com/NixOS/nixpkgs/issues/75867#issuecomment-2575753502
programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.kdePackages.ksshaskpass.out}/bin/ksshaskpass";

# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};

# Enable CUPS to print documents.
services.printing.enable = true;
documentation.nixos.enable = false;

# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;

# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};

# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;

# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.eric = {
isNormalUser = true;
description = "Eric";
extraGroups = [ "networkmanager" "wheel" "docker" ];
shell = pkgs.zsh;
packages = with pkgs; [
vim-full
git
discord
jetbrains.clion
neofetch
plex-desktop
python3Full
zulu23 # java
halloy
signal-desktop
thunderbird
imhex
libreoffice-fresh
unar
rar
zip
minivmac # my fork!
orca-slicer
obs-studio
lutris
nvd
filezilla
htop
iotop
heroic
file
kicad-small
dig
inetutils
deluge
unstable.wineWowPackages.stable
unstable.winetricks
bottles
unzip
minipro
ffmpeg-full # for FF codecs
mp4v2 # for FF codec quicktime
vscodium
dhewm3 # DOOM3 source port
pinta
gimp
kiwix
rpcs3
vlc
ghostty
sniffnet
];
};

# boot.kernelPackages = pkgs.linuxPackages_6_12;
# This is for obs virtual camera.
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
boot.kernelModules = ["v4l2loopback" ];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
security.polkit.enable = true;
#obs virtual camera end
# Install firefox.
programs.firefox.enable = true;

programs.zsh.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};


# Allow unfree packages
nixpkgs.config.allowUnfree = true;

# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
#  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
#  wget
];

virtualisation.docker.enable = true;

# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
#   enable = true;
#   enableSSHSupport = true;
# };

# List services that you want to enable:

# Enable the OpenSSH daemon.
services.openssh.enable = true;

# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;

# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?

}

Ok i figured out how to remove old generations (that was the word i was looking for) and have a clean rebuild.

Again the first (2nd and 3rd) nix-rebuild switches failed - but i just kept trying and then suddenly it worked. Again the only change is the diff above for 6.12. I saw random errors like/nix/store/c848ig7xpp7ny7xqyckjk5r2z7h7hn9r-linux-6.12.11-dev/lib/modules/6.12.11/source/include/linux/highmem.h:14:10:fatal error: highmem-internal.h: No such file or directory and gcc faults and just a lot of random build issues.

Something is very strange in this build if “build it again N times” is the solution.

So I searched online but I couldn’t find any one with the same issue.
So can you build other kernelmodules/Drivers always first try and do you have any instability issues with you CPU (What are you temps when building/compiling)?

So, to give you an actual answer to this, the nvidia driver is - unlike all other drivers running on your system - not part of the upstream Linux kernel.

This will seem unsurprising and like not a big deal, but it’s the root of this issue. It’s also in part why they’re not a mesa driver, which causes all the other issues, and their insistence on testing the limits of the GPL to get around this self-imposed limitation is also ultimately why Linus gave them the middle finger.

Since it’s not part of the upstream kernel, but still has to be written using very deep, kernel-internal functions, any change to the Linux upstream can cause a particular nvidia driver version to become incompatible. Someone changes a little function in the graphics stack to need another arg? Whelp, the nvidia drivers have to be adjusted to this, and nvidia need to release a new version to make them work with this kernel.

Sometimes this is faster, sometimes less so. This is why it’s usually advisable to run the nvidia driver against the LTS kernel (“long term support”, i.e. only bugfixes and the APIs stay consistent for a long time), since nvidia have to make their drivers compatible with that for ubuntu/debian support.

Since this is the case, I would really not suggest using a more recent kernel, even if you were using the beta branch (you aren’t), that suggestion frankly makes no sense given nvidia’s development target (though they will sometimes add fixes for more recent kernels on that branch a bit faster if you are using a more recent kernel).

Besides this, as long as you’re not using the LTS kernel, yeah, nvidia drivers will occasionally fail to build, sometimes it’ll take longer to resolve. Not much you can do about this, besides, y’know, using kernels that the driver is actually compatible with (and if you have very new hardware you’re sool until nvidia upstream their drivers, or your other drivers make it to an LTS kernel).


With this out of the way, something seems very wrong here. Rebuilding the same config with the same driver/kernel versions should not result in build failures; This is nix, the builds should be reproducible. You’re also using the LTS kernel with no custom patches and the current stable nvidia driver; this built fine for me yesterday.

This means one of two things:

  • Your channels are messed up and you’re in a big mess
    • Please share where you get your inputs besides unstable (a flake? If so, that’s an indicator of at least some misunderstandings)
  • Memory/drive failure?
    • Your config looks clean otherwise and you seem to know what you’re doing, so for once this seems like it’s not too far out there.

Finally, since I’m on a crusade to wipe out every last instance of that darned abandoned wiki’s advice:

Nvidia tells us not to do that.

1 Like

Edited this wiki section by adding additional details for the hardware.nvidia.open option

1 Like

Thanks for the response and I understand your points, but I can reproduce this with no channel changes, repeatedly running switch with no --upgrade will cause the build to eventually pass. There is something in the build that is not correct.

I’m not following - this is the recommended way to add individual packages from unstable - and only affect the 2 wine packages prefixed with unstable. in my user section. Secondly (my fault) I added this after doing all my testing so there was no unstable in any of my tests (even though it wouldn’t affect anything other then the 2 wine packages). Lastly I don’t use any flakes.

I actually did to a memtest before installing as it was on the NixOS installer - no errors. The drive is a brand new NVME - no smart errors reported and no instability.

Only following what I’m told from the wiki:
# Currently alpha-quality/buggy, so false is currently the recommended setting.
https://nixos.wiki/wiki/Nvidia

Edit: Switched to open true now.

I build and compile things all day on this machine (software dev by trade) - and just played through a 3D 2020 AAA game with no issues. I can monitor though everything else on this machine runs great.

That’s a wiki, this is the wiki and actually maintained: NVIDIA - NixOS Wiki

That’s my point, and that something means that your system is in an utterly broken state for how NixOS systems should behave.

Right, I’m not concerned about the unstable bit, what are your channels pointing at? If nothing else, if you give the commits we can try and reproduce this build of yours, and if it’s not flaky that’d again point to some kind of hardware failure.

Your NVME being new makes this slightly more likely, actually, hardware tends to fail early or very late, it’s not a bell curve. Manufacturing defects and whatnot.