diff options
Diffstat (limited to 'archetypes/profiles/cuda/default.nix')
| -rw-r--r-- | archetypes/profiles/cuda/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/archetypes/profiles/cuda/default.nix b/archetypes/profiles/cuda/default.nix new file mode 100644 index 0000000..b57b854 --- /dev/null +++ b/archetypes/profiles/cuda/default.nix @@ -0,0 +1,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) ]; +} |
