hp/elitebook/2560p: Initial commit

This commit is contained in:
Antoine Viallon 2022-01-24 21:15:10 +01:00 committed by Jörg Thalheim
parent 57c7dfde9d
commit 58103331f5
3 changed files with 62 additions and 0 deletions

View file

@ -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;
};
}

View file

@ -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
];
};
};
}

View file

@ -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"
];
};
}