diff options
Diffstat (limited to 'os/cez/hardware-configuration.nix')
-rw-r--r-- | os/cez/hardware-configuration.nix | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/os/cez/hardware-configuration.nix b/os/cez/hardware-configuration.nix index 3877852..39dc3a6 100644 --- a/os/cez/hardware-configuration.nix +++ b/os/cez/hardware-configuration.nix @@ -14,9 +14,9 @@ ]; hardware = { + bluetooth.enable = true; # override nixos-hardware values nvidia.prime.offload.enable = false; - bluetooth.enable = true; }; services.xserver.videoDrivers = [ "modesetting" ]; @@ -46,4 +46,29 @@ fsType = "ext4"; }; }; + + specialisation.nvidia.configuration = { + boot = { + kernelParams = [ "transparent_hugepage=always" ]; + kernel.sysctl."vm.max_map_count" = 2147483642; + }; + + environment.variables = { + DRI_PRIME = 1; + __NV_PRIME_RENDER_OFFLOAD = 1; + __VK_LAYER_NV_optimus = "NVIDIA_only"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + }; + + hardware.nvidia = { + open = true; + nvidiaSettings = false; + prime.sync.enable = true; + }; + + services = { + xserver.videoDrivers = [ "nvidia" ]; + tlp.settings.PLATFORM_PROFILE_ON_AC = lib.mkForce "performance"; + }; + }; } |