hardware.gpu: nvidia beta use open-source driver, production use 535

This commit is contained in:
2024-06-13 23:46:57 +08:00
parent a8833dac7f
commit bb5aee5545
3 changed files with 8 additions and 5 deletions

View File

@@ -153,7 +153,6 @@ inputs:
(dir: { directory = "repo/${dir}"; user = "chn"; group = "chn"; mode = "0755"; })
[ "lammps-SiC" "BPD-paper" "kurumi-asmr" "linwei-stuff" "BPD-paper-old" ];
};
hardware.nvidia.open = true;
specialisation =
{
nvidia.configuration =

6
flake.lock generated
View File

@@ -1444,11 +1444,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1718089940,
"narHash": "sha256-ZuxY2ntEDl6DX6y5+VrYEjNXH/2OSpmwYda3Zh7mySQ=",
"lastModified": 1718293815,
"narHash": "sha256-M8Begx/FQ5dtR+FaV1+Ff7Siq5FX2dvbFIYHNoGPdOg=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "4372d67274827ca663e07130a360d7413bf47d04",
"rev": "ecd5c77a9a8b4f041b4bcb649cd219189e85987d",
"type": "github"
},
"original": {

View File

@@ -64,8 +64,12 @@ inputs:
dynamicBoost.enable = inputs.lib.mkIf gpu.nvidia.dynamicBoost true;
nvidiaSettings = true;
forceFullCompositionPipeline = true;
package = inputs.config.boot.kernelPackages.nvidiaPackages.${gpu.nvidia.driver};
package =
let actualDriver = { production = "legacy_535"; }.${gpu.nvidia.driver} or gpu.nvidia.driver;
in inputs.config.boot.kernelPackages.nvidiaPackages.${actualDriver};
prime.allowExternalGpu = true;
# nvidia 555 package have some bug, should use open
open = inputs.lib.mkIf (gpu.nvidia.driver == "beta") true;
};
};
boot =