From 58103331f57386780bd9a7ec3a94d68a7460243b Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Mon, 24 Jan 2022 21:15:10 +0100 Subject: [PATCH 1/4] hp/elitebook/2560p: Initial commit --- hp/elitebook/2560p/default.nix | 22 ++++++++++++++++++++++ hp/elitebook/2560p/igpu.nix | 28 ++++++++++++++++++++++++++++ hp/elitebook/2560p/network.nix | 12 ++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 hp/elitebook/2560p/default.nix create mode 100644 hp/elitebook/2560p/igpu.nix create mode 100644 hp/elitebook/2560p/network.nix diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix new file mode 100644 index 0000000..2055532 --- /dev/null +++ b/hp/elitebook/2560p/default.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: +with lib; +let + xcfg = config.services.xserver; +in +{ + imports = [ + ../../../common/cpu/intel + ../../../common/cpu/intel/sandy-bridge + ../../../common/pc + ../../../common/pc/laptop + ../../../common/pc/laptop/hdd + ../../../common/pc/hdd + + ./network.nix + ./igpu.nix + ]; + + config = { + services.thermald.enable = mkDefault true; + }; +} diff --git a/hp/elitebook/2560p/igpu.nix b/hp/elitebook/2560p/igpu.nix new file mode 100644 index 0000000..2b6c789 --- /dev/null +++ b/hp/elitebook/2560p/igpu.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: +with lib; +let + xcfg = config.services.xserver; + cfg = config.hardware.hp.elitebook.graphics; +in +{ + options.hardware.hp.elitebook.graphics = { + enable = mkOption { + default = xcfg.enable; + example = !xcfg.enable; + description = "Wether to enable iGPU related settings for HP Elitebook laptops"; + type = types.bool; + }; + }; + + config = mkIf cfg.enable { + boot.initrd.kernelModules = [ "i915" ]; + hardware.opengl = { + enable = mkDefault true; + extraPackages = with pkgs; [ + vaapiIntel + libvdpau-va-gl + ]; + }; + }; +} + diff --git a/hp/elitebook/2560p/network.nix b/hp/elitebook/2560p/network.nix new file mode 100644 index 0000000..23c5284 --- /dev/null +++ b/hp/elitebook/2560p/network.nix @@ -0,0 +1,12 @@ +{ config, pkgs, lib, ... }: +with lib; +{ + config = { + # Wifi can't connect if rand mac address is used + networking.networkmanager.extraConfig = concatStringsSep "\n" [ + "[device]" + "match-device=driver:iwlwifi" + "wifi.scan-rand-mac-address=no" + ]; + }; +} From 12d52a8025fb98c3edaf9672342e79f20eebd451 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Mon, 24 Jan 2022 21:25:42 +0100 Subject: [PATCH 2/4] hp/elitebook/2560p: Update project README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d913362..b0445b7 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ See code for all available configurations. | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Google Pixelbook](google/pixelbook) | `` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | From 27032fb49376d45d289e9b578079c4ac4b16b182 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Tue, 25 Jan 2022 09:55:24 +0100 Subject: [PATCH 3/4] hp/elitebook/2560p: Remove redundant graphics settings. --- hp/elitebook/2560p/default.nix | 1 - hp/elitebook/2560p/igpu.nix | 28 ---------------------------- 2 files changed, 29 deletions(-) delete mode 100644 hp/elitebook/2560p/igpu.nix diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix index 2055532..de34e15 100644 --- a/hp/elitebook/2560p/default.nix +++ b/hp/elitebook/2560p/default.nix @@ -13,7 +13,6 @@ in ../../../common/pc/hdd ./network.nix - ./igpu.nix ]; config = { diff --git a/hp/elitebook/2560p/igpu.nix b/hp/elitebook/2560p/igpu.nix deleted file mode 100644 index 2b6c789..0000000 --- a/hp/elitebook/2560p/igpu.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let - xcfg = config.services.xserver; - cfg = config.hardware.hp.elitebook.graphics; -in -{ - options.hardware.hp.elitebook.graphics = { - enable = mkOption { - default = xcfg.enable; - example = !xcfg.enable; - description = "Wether to enable iGPU related settings for HP Elitebook laptops"; - type = types.bool; - }; - }; - - config = mkIf cfg.enable { - boot.initrd.kernelModules = [ "i915" ]; - hardware.opengl = { - enable = mkDefault true; - extraPackages = with pkgs; [ - vaapiIntel - libvdpau-va-gl - ]; - }; - }; -} - From e93140487c260c743a00052fb33d0aa6c9f0a846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 4 Feb 2022 13:59:12 +0100 Subject: [PATCH 4/4] elitebook/2560p: fix reference in markdown --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0445b7..aeb5ef9 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ you can easily pin to a particular revision if you desire more stability. See code for all available configurations. | Model | Path | -| ------------------------------------------------------------------- | -------------------------------------------------- | +|---------------------------------------------------------------------|----------------------------------------------------| | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | @@ -75,7 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | @@ -103,7 +103,7 @@ See code for all available configurations. | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Google Pixelbook](google/pixelbook) | `` | -| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` |