diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-07-31 14:45:24 +0000 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-07-31 14:45:24 +0000 |
commit | 8fecc5f5924c9a56ee4ee034d74cd8af3efd5fee (patch) | |
tree | 0e862d2bd9029ca9d02ae0c2dff7ddf5da83fb0c /nixos/nvidia.nix | |
parent | f10f6922fb9ea8b2535e97549a92cdf2d5cee08e (diff) | |
download | nixos-configuration-8fecc5f5924c9a56ee4ee034d74cd8af3efd5fee.tar.gz nixos-configuration-8fecc5f5924c9a56ee4ee034d74cd8af3efd5fee.tar.bz2 nixos-configuration-8fecc5f5924c9a56ee4ee034d74cd8af3efd5fee.zip |
feat: inherited Nvidia configuration from old conf
Diffstat (limited to 'nixos/nvidia.nix')
-rw-r--r-- | nixos/nvidia.nix | 34 |
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; + }; +} |