blob: b57b8540ddad3a6f08ecb92345095d70dae64ca9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{ lib, pkgs, ... }: let
mkCuda = lib.mkOverride 800;
nixosConfig = {
# Binary cache packages built with cudaSupport
nix.settings = {
substituters = mkCuda [ "https://cache.nixos-cuda.org" ];
trusted-public-keys = mkCuda [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ];
};
# Enable cudaSupport
nixpkgs.config.cudaSupport = mkCuda true;
_archetypes.collections = {
nvidia.enable = mkCuda true;
};
# Enable nvidia graphics
services.xserver.videoDrivers = mkCuda [ "nvidia" ]; # xserver.videoDrivers does not imply X
hardware.graphics.enable = mkCuda true;
};
homeConfig = {};
in {
imports = [ (lib._mkProfileArchetype "cuda" nixosConfig homeConfig) ];
}
|