diff options
author | sinanmohd <sinan@sinanmohd.com> | 2025-09-14 14:16:24 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2025-10-17 08:24:03 +0530 |
commit | 4adecfd73db61b8feaf168acdf488e514b7c3f1e (patch) | |
tree | 8c762505e33a9e95006b1d9821530cbcf9b66eea | |
parent | 8c3ada3cdb868150be288223b9524fb152db26bc (diff) |
chore(modules/specialisation): refactor
-rw-r--r-- | os/cez/configuration.nix | 1 | ||||
-rw-r--r-- | os/cez/hardware-configuration.nix | 27 | ||||
-rw-r--r-- | os/cez/modules/specialisation.nix | 27 |
3 files changed, 26 insertions, 29 deletions
diff --git a/os/cez/configuration.nix b/os/cez/configuration.nix index debae56..255c19a 100644 --- a/os/cez/configuration.nix +++ b/os/cez/configuration.nix @@ -3,7 +3,6 @@ ../pc/configuration.nix ./hardware-configuration.nix - ./modules/specialisation.nix ./modules/wireguard.nix ./modules/tlp.nix ../../global/cez 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"; + }; + }; } diff --git a/os/cez/modules/specialisation.nix b/os/cez/modules/specialisation.nix deleted file mode 100644 index e401e1b..0000000 --- a/os/cez/modules/specialisation.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, ... }: -{ - 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"; - }; - }; -} |