mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Hardware/Nvidia] Add nvtop + enhance conf
Remove dead config Use mkIF instead of ifEnable
This commit is contained in:
parent
98c0ce1bc0
commit
0da55b8288
1 changed files with 6 additions and 11 deletions
|
|
@ -17,18 +17,8 @@ in {
|
|||
|
||||
hardware.nvidia = {
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = ifEnable config.hardware.nvidia.prime.offload.enable true;
|
||||
powerManagement.finegrained = mkIf config.hardware.nvidia.prime.offload.enable true;
|
||||
modesetting.enable = true;
|
||||
#package = with config.boot.kernelPackages.nvidiaPackages;
|
||||
# if (cfg.driver == "stable") then
|
||||
# stable
|
||||
# else if (cfg.driver == "390") then
|
||||
# legacy_390
|
||||
# else if (cfg.driver == "340") then
|
||||
# legacy_340
|
||||
# else
|
||||
# null
|
||||
# ;
|
||||
};
|
||||
|
||||
aviallon.boot.cmdline = mkIf cfg.saveAllVram {
|
||||
|
|
@ -39,6 +29,7 @@ in {
|
|||
aviallon.programs.allowUnfreeList = [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
"cudatoolkit"
|
||||
];
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
|
|
@ -51,6 +42,10 @@ in {
|
|||
vaapiVdpau
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvtop
|
||||
];
|
||||
|
||||
# See documentation here: https://download.nvidia.com/XFree86/Linux-x86_64/510.60.02/README/openglenvvariables.html
|
||||
environment.variables = {
|
||||
"__GL_YIELD" = "USLEEP"; # use usleep(0) instead of sched_yield() -> better performance in most cases
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue