From 89a33c8e93a64d4f65ca3a2c7bc9da24216aa0b9 Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Mon, 1 Jul 2024 23:22:53 +0200 Subject: [PATCH] omen 16-n0280nd: init --- flake.nix | 1 + omen/16-n0280nd/README.md | 5 +++++ omen/16-n0280nd/default.nix | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 omen/16-n0280nd/README.md create mode 100644 omen/16-n0280nd/default.nix diff --git a/flake.nix b/flake.nix index 545253a..5eddd5a 100644 --- a/flake.nix +++ b/flake.nix @@ -232,6 +232,7 @@ omen-14-fb0798ng = import ./omen/14-fb0798ng; omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; + omen-16-n0280nd = import ./omen/16-n0280nd; omen-15-en1007sa = import ./omen/15-en1007sa; omen-15-en0002np = import ./omen/15-en0002np; onenetbook-4 = import ./onenetbook/4; diff --git a/omen/16-n0280nd/README.md b/omen/16-n0280nd/README.md new file mode 100644 index 0000000..1fa601c --- /dev/null +++ b/omen/16-n0280nd/README.md @@ -0,0 +1,5 @@ +# HP Omen 16-n0280nd + +## ACPI platform profiles + +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. diff --git a/omen/16-n0280nd/default.nix b/omen/16-n0280nd/default.nix new file mode 100644 index 0000000..3929c66 --- /dev/null +++ b/omen/16-n0280nd/default.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +}