Added nvidia drivers

This commit is contained in:
didier committed 2024-10-30 08:11:33 -04:00
1 parent 319e5f4e0f
commit 43423300b5
2 files changed
+23 -1

No files matched your search

+15 -1
View File
@@ -1,4 +1,4 @@
{ pkgs, lib, modulesPath, ... }: {
{ pkgs, lib, modulesPath, config, ... }: {
imports = [ "${modulesPath}/virtualisation/google-compute-image.nix" ];
config = {
@@ -55,6 +55,7 @@
bat
ripgrep
helix
(pkgs.python312.withPackages (ps: [ps.torch]))
];
nixpkgs.config.allowUnfree = true;
nixpkgs.config.cudaSupport = true;
@@ -62,5 +63,18 @@
services.openssh.settings.PasswordAuthentication = false;
programs.zsh.enable = true;
services.xserver.videoDrivers = ["nvidia"];
nix.settings.substituters = [
"https://cuda-maintainers.cachix.org"
];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
hardware.graphics.enable = true;
};
}