i’ve done what you suggested. here is the result, much the same:
/build/NVIDIA-Linux-x86_64-520.56.06/kernel/nvidia/nv-mmap.c: In function ‘nvidia_mmap_numa’:
/build/NVIDIA-Linux-x86_64-520.56.06/kernel/nvidia/nv-mmap.c:446:19: error: assignment of read-only member ‘vm_flags’
446 | vma->vm_flags |= VM_MIXEDMAP;
| ^~
/build/NVIDIA-Linux-x86_64-520.56.06/kernel/nvidia/nv-dma.c: In function ‘nv_dma_use_map_resource’:
/build/NVIDIA-Linux-x86_64-520.56.06/kernel/nvidia/nv-dma.c:783:5: warning: ISO C90 forbids mixed declarations and code [8;;Warning Options (Using the GNU Compiler Collection (GCC))]
783 | const struct dma_map_ops *ops = get_dma_ops(dma_dev->dev);
| ^~~~~
/build/NVIDIA-Linux-x86_64-520.56.06/kernel/nvidia/nv-mmap.c: In function ‘nvidia_mmap_helper’:
/build/NVIDIA-Linux-x86_64-520.56.06/kernel/nvidia/nv-mmap.c:580:23: error: assignment of read-only member ‘vm_flags’
580 | vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND;
…and several more vm_flags errors.
the c90 warning made me think it could be a c standard thing, though i’m not a c programmer and anyway i don’t know how to get nix to adjust the compiler flags
i started out with just services.xserver.videoDrivers = [ "intel" "nvidia" ]; and only started trying the other stuff when the compile began to error out.
You’re not actually running nixos-23.05. You’re building version 520.56.06 of the nvidia driver, but nixos-23.05 was released with version 530.41.03. If I build with nixos-22.11, it builds 520.56.06, and it fails if I use linux 6.3 with the same error as your’s. If I use the default linux 5.15, it builds fine. But yea, you’re not running NixOS 23.05, and in NixOS 22.11, the solution is to not use linux 6.3. EDIT: And to be clear, it builds fine for linux 6.3 on nixos-23.05
thanks, ej. you spotted my mistake(s). i seem to have mismanaged channels and packages. for example i thought i had upgraded to 23.05 but had not. must have made a typo. need to get a better grip on what is on my system.