summaryrefslogtreecommitdiff
path: root/os/cez
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-08-27 17:37:10 +0530
committersinanmohd <sinan@sinanmohd.com>2024-08-27 18:17:41 +0530
commitf7f109cb140953a0d3053e5f15129535defd223a (patch)
tree8f50f39654b4118d237fd7a0e3ba16930a4deb08 /os/cez
parent20f23006a2204d3fc94da39ca24f8bc78a5bc386 (diff)
flake/nixos-hardware: init
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;