hp/elitebook/2560p: Initial commit
This commit is contained in:
parent
57c7dfde9d
commit
58103331f5
22
hp/elitebook/2560p/default.nix
Normal file
22
hp/elitebook/2560p/default.nix
Normal 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;
|
||||
};
|
||||
}
|
28
hp/elitebook/2560p/igpu.nix
Normal file
28
hp/elitebook/2560p/igpu.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
12
hp/elitebook/2560p/network.nix
Normal file
12
hp/elitebook/2560p/network.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue