forked from rarias/jungle
Compare commits
2 Commits
a17d9bdfc3
...
fc3de21af7
Author | SHA1 | Date | |
---|---|---|---|
fc3de21af7 | |||
cfdada0008 |
@ -5,6 +5,7 @@
|
||||
../common/base.nix
|
||||
../common/xeon/console.nix
|
||||
../module/emulation.nix
|
||||
../module/nvidia.nix
|
||||
];
|
||||
|
||||
# Select the this using the ID to avoid mismatches
|
||||
@ -53,12 +54,8 @@
|
||||
extra-trusted-public-keys = [ "jungle.bsc.es:pEc7MlAT0HEwLQYPtpkPLwRsGf80ZI26aj29zMw/HH0=" ];
|
||||
};
|
||||
|
||||
# Configure Nvidia driver to use with CUDA
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
# Recommended for new graphics cards
|
||||
hardware.nvidia.open = true;
|
||||
hardware.graphics.enable = true;
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# Mount NVME disks
|
||||
fileSystems."/nvme0" = { device = "/dev/disk/by-label/nvme0"; fsType = "ext4"; };
|
||||
|
14
m/module/nvidia.nix
Normal file
14
m/module/nvidia.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
# Configure Nvidia driver to use with CUDA
|
||||
hardware.nvidia.package = lib.mkDefault config.boot.kernelPackages.nvidiaPackages.production;
|
||||
hardware.nvidia.open = lib.mkDefault (builtins.abort "hardware.nvidia.open not set");
|
||||
hardware.graphics.enable = true;
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# enable support for derivations which require nvidia-gpu to be available
|
||||
# > requiredSystemFeatures = [ "cuda" ];
|
||||
programs.nix-required-mounts.enable = true;
|
||||
programs.nix-required-mounts.presets.nvidia-gpu.enable = true;
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
../module/emulation.nix
|
||||
../module/debuginfod.nix
|
||||
../module/ssh-hut-extern.nix
|
||||
../module/nvidia.nix
|
||||
../eudy/kernel/perf.nix
|
||||
];
|
||||
|
||||
@ -49,11 +50,8 @@
|
||||
# Enable performance governor
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
|
||||
# Configure Nvidia driver to use with CUDA
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
hardware.graphics.enable = true;
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
# Older graphics card, open driver not supported
|
||||
hardware.nvidia.open = false;
|
||||
|
||||
# Disable garbage collection for now
|
||||
nix.gc.automatic = lib.mkForce false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user