summaryrefslogtreecommitdiff
path: root/os
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
parent20f23006a2204d3fc94da39ca24f8bc78a5bc386 (diff)
flake/nixos-hardware: init
Diffstat (limited to 'os')
-rw-r--r--os/cez/hardware-configuration.nix26
-rw-r--r--os/pc/modules/wayland.nix6
2 files changed, 29 insertions, 3 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;
diff --git a/os/pc/modules/wayland.nix b/os/pc/modules/wayland.nix
index e488f24..7380e71 100644
--- a/os/pc/modules/wayland.nix
+++ b/os/pc/modules/wayland.nix
@@ -31,6 +31,10 @@ in {
};
};
- hardware.graphics.enable = true;
+ hardware.graphics = {
+ enable = true;
+ enable32Bit = true;
+ };
+
security.pam.services.swaylock = {};
}