Added nvidia drivers
This commit is contained in:
1 parent
319e5f4e0f
commit
43423300b5
2 files changed
+23
-1
No files matched your search
@@ -1,5 +1,13 @@
|
||||
{
|
||||
description = "Tool to build NixOS for GCP. ";
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
+15
-1
@@ -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;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user