aboutsummaryrefslogtreecommitdiff
path: root/nixos/nvidia.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/nvidia.nix')
-rw-r--r--nixos/nvidia.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix
new file mode 100644
index 0000000..e75a77a
--- /dev/null
+++ b/nixos/nvidia.nix
@@ -0,0 +1,34 @@
+{
+ config,
+ lib,
+ ...
+}: {
+ specialisation = {
+ powersave.configuration = {
+ hardware.nvidia.prime = {
+ offload = {
+ enable = lib.mkForce true;
+ enableOffloadCmd = lib.mkForce true;
+ };
+ sync.enable = lib.mkForce false;
+ };
+ };
+ };
+ hardware.nvidia = {
+ prime = {
+ offload.enable = false;
+ sync = {
+ enable = true;
+ };
+ amdgpuBusId = "PCI:5:0:0";
+ nvidiaBusId = "PCI:1:0:0";
+ };
+ forceFullCompositionPipeline = true;
+ modesetting.enable = true;
+ powerManagement.enable = false;
+ powerManagement.finegrained = false;
+ open = true;
+ nvidiaSettings = true;
+ package = config.boot.kernelPackages.nvidiaPackages.stable;
+ };
+}