From 2a964239f6b6473a6ff28892109ebf39a6151b1c Mon Sep 17 00:00:00 2001 From: Matz Momme Klint Date: Sun, 12 May 2024 15:49:32 +0200 Subject: [PATCH] omen/14-fb0798ng: init --- README.md | 1 + flake.nix | 1 + omen/14-fb0798ng/README.md | 4 ++++ omen/14-fb0798ng/default.nix | 23 +++++++++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 omen/14-fb0798ng/README.md create mode 100644 omen/14-fb0798ng/default.nix diff --git a/README.md b/README.md index ae31ca1..b9191de 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,7 @@ See code for all available configurations. | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | +| [Omen 15-en0010ca](omen/14-fb0798ng) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | | [Omen 15-en1007sa](omen/15-en1007sa) | `` | diff --git a/flake.nix b/flake.nix index a025df1..f23b1c5 100644 --- a/flake.nix +++ b/flake.nix @@ -208,6 +208,7 @@ nxp-imx8qm-mek = import ./nxp/imx8qm-mek; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; + omen-14-fb0798ng = import ./omen/14-fb0798ng; omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; omen-15-en1007sa = import ./omen/15-en1007sa; diff --git a/omen/14-fb0798ng/README.md b/omen/14-fb0798ng/README.md new file mode 100644 index 0000000..910c571 --- /dev/null +++ b/omen/14-fb0798ng/README.md @@ -0,0 +1,4 @@ +# HP Omen 14-fb0798ng + +## 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/14-fb0798ng/default.nix b/omen/14-fb0798ng/default.nix new file mode 100644 index 0000000..20ce9a3 --- /dev/null +++ b/omen/14-fb0798ng/default.nix @@ -0,0 +1,23 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/intel + ../../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" ]; + }; + + # Enables Wifi and Bluetooth + hardware.enableRedistributableFirmware = true; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +}