systemm.nixpkgs: add cudatoolkit

This commit is contained in:
陈浩南 2024-02-20 19:08:46 +08:00
parent 128b83a7c6
commit 77d268d883

View File

@ -146,13 +146,14 @@ inputs:
in { GENERIC_CPU = inputs.lib.kernel.no; ${kernelConfig.${nixpkgs.march}} = inputs.lib.kernel.yes; };
}];
}
{
nixpkgs.config = mkIf nixpkgs.cuda.enable
(
{ cudaSupport = true; }
(
mkIf nixpkgs.cuda.enable
{
nixpkgs.config = { cudaSupport = true; }
// (if nixpkgs.cuda.capabilities != null then { cudaCapabilities = nixpkgs.cuda.capabilities; } else {})
// (if nixpkgs.cuda.forwardCompat != null then { cudaForwardCompat = nixpkgs.cuda.forwardCompat; }
else {}));
}
// (if nixpkgs.cuda.forwardCompat != null then { cudaForwardCompat = nixpkgs.cuda.forwardCompat; } else {});
environment.systemPackages = [ inputs.pkgs.cudatoolkit ];
}
)
];
}