summaryrefslogtreecommitdiff
path: root/os/cez
diff options
context:
space:
mode:
Diffstat (limited to 'os/cez')
-rw-r--r--os/cez/hardware-configuration.nix26
1 files changed, 24 insertions, 2 deletions
diff --git a/os/cez/hardware-configuration.nix b/os/cez/hardware-configuration.nix
index e6ade24..a9dd37b 100644
--- a/os/cez/hardware-configuration.nix
+++ b/os/cez/hardware-configuration.nix
@@ -1,7 +1,29 @@
-{ modulesPath, ... }:
+{ modulesPath, nixos-hardware, lib, ... }:
{
- imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+ imports = [
+ nixos-hardware.nixosModules.lenovo-ideapad-16ach6
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ # override nixos-hardware values
+ hardware.nvidia.prime.offload.enable = false;
+ services.xserver.videoDrivers = [ "modesetting" ];
+
+ specialisation.nvidia.configuration = {
+ hardware.nvidia = {
+ open = true;
+ nvidiaSettings = false;
+ prime.sync.enable = true;
+ };
+
+ services = {
+ xserver.videoDrivers = [ "nvidia" ];
+ tlp.settings.PLATFORM_PROFILE_ON_AC = lib.mkForce "performance";
+ };
+ nixpkgs.config.allowUnfreePredicate =
+ pkg: builtins.elem (lib.getName pkg) [ "nvidia-x11" ];
+ };
boot = {
loader.systemd-boot.enable = true;