How to get Cuda working in Blender?

If you’re using flakes, you can also use the blender-bin flake, which just wraps the upstream Blender binaries, so it has CUDA support. You can run the most recent stable version using nix run blender-bin, or enable it in a NixOS configuration:

{
  outputs = { self, nixpkgs, blender-bin }: {
    nixosConfigurations.bla = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules =
        [ ({ config, pkgs, ... }:
          { nixpkgs.overlays = [ blender-bin.overlay ];
            environment.systemPackages = [ pkgs.blender_2_93 ];
          })
          ...
        ];
    };
  };
}
2 Likes