Skip to content

Commit

Permalink
Add option to enable beta driver
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitawootten committed Dec 2, 2023
1 parent 6f015fc commit 7fe6438
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hostModules/personal/nvidia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ in
description = "If true, enable NVidia settings";
default = true;
};
betaDriver = lib.mkEnableOption "enable beta driver";
};

config = lib.mkIf cfg.enable {
Expand All @@ -27,9 +28,11 @@ in
modesetting.enable = true;
open = false;
nvidiaSettings = !cfg.headless;
package = config.boot.kernelPackages.nvidiaPackages.stable;
package = if cfg.betaDriver
then config.boot.kernelPackages.nvidiaPackages.beta
else config.boot.kernelPackages.nvidiaPackages.stable;
};

virtualisation.docker.enableNvidia = true;
};
}
}

0 comments on commit 7fe6438

Please sign in to comment.