1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-23 10:09:44 +01:00

Merge pull request #25 from Ma27/general-thinkpad-configuration

General thinkpad configuration
This commit is contained in:
Rok Garbas 2017-10-20 13:31:21 +02:00 committed by GitHub
commit a64cf32a57
9 changed files with 41 additions and 52 deletions

View file

@ -1,3 +1,6 @@
# NOTE: this doesn't inherit from the `general.nix`
# as z510 is not a ThinkPad
{ config, pkgs, ... }:
{
hardware.cpu.intel.updateMicrocode = true;

View file

@ -0,0 +1,6 @@
{ ... }:
{
boot.kernelModules = mkDefault [ "kvm-intel" ];
services.xserver.videoDrivers = [ "intel" ];
}

View file

@ -0,0 +1,22 @@
{ pkgs, lib, ... }:
with lib;
{
hardware.trackpoint = mkDefault {
enable = true;
emulateWheel = true;
};
hardware.enableRedistributableFirmware = mkDefault true;
services.tlp.enable = true;
services.xserver = mkDefault {
synaptics.enable = false;
libinput.enable = true;
};
environment.systemPackages = [ pkgs.acpi ];
sound.enableMediaKeys = mkDefault true;
}

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
imports = [ ./general-intel.nix ];
boot = {
kernelParams = [
# Kernel GPU Savings Options (NOTE i915 chipset only)

View file

@ -1,10 +1,12 @@
{ config, pkgs, ... }:
{
imports = [ ./general-intel.nix ];
boot = {
extraModprobeConfig = ''
options bbswitch use_acpi_to_detect_card_state=1
'';
kernelModules = [ "kvm-intel" "tpm-rng" ];
kernelModules = [ "tpm-rng" ];
};
}

View file

@ -3,6 +3,7 @@
{
imports =
[ ../lib/kernel-version.nix
./general-intel.nix
];
## BEGIN from generated hardware-configuration
@ -26,9 +27,6 @@
{ version = "4.6"; msg = "Suspending the T460s by closing the lid when running on battery causes the machine to freeze up entirely."; }
];
# For the wifi (intel iwlwifi)
hardware.enableAllFirmware = true;
# For the screen. I don't know what to do with this information, but
# the hiDPI support is far from perfect (as of July 2016):
@ -39,21 +37,4 @@
# Aspect Ratio: 16 × 9 (1.78:1)
# Pixel Count: 3,686,400
# Megapixels: 3.69MP
# Use libinput to let the physical middle button be used to scroll
# with the trackpoint
services.xserver = {
libinput.enable = true;
synaptics.enable = false;
config = ''
Section "InputClass"
Identifier "Enable libinput for TrackPoint"
MatchIsPointer "on"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "8"
EndSection
'';
};
}

View file

@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }:
{
imports = [ ./general.nix ];
boot = {
# wireless
kernelModules = [ "kvm-amd" "wl" ];
@ -14,13 +16,4 @@
# video card
services.xserver.videoDrivers = ["ati"];
# trackpad (touchpad disabled)
hardware.trackpoint = {
enable = true;
emulateWheel = true;
};
# media keys
sound.enableMediaKeys = true;
}

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
imports = [ ./general-intel.nix ];
# TPM chip countains a RNG
security.rngd.enable = true;
@ -9,22 +11,9 @@
extraModulePackages = [ config.boot.kernelPackages.tp_smapi ];
};
# TLP Linux Advanced Power Management
services.tlp.enable = true;
# hard disk protection if the laptop falls
services.hdapsd.enable = true;
# trackpoint support (touchpad disabled in this config)
hardware.trackpoint.enable = true;
hardware.trackpoint.emulateWheel = true;
# alternatively, touchpad with two-finger scrolling
#services.xserver.libinput.enable = true;
# enable volume control buttons
sound.enableMediaKeys = true;
# fingerprint reader: login and unlock with fingerprint (if you add one with `fprintd-enroll`)
#services.fprintd.enable = true;
#security.pam.services.login.fprintAuth = true;

View file

@ -1,9 +0,0 @@
{ config, pkgs, ... }:
{
# modesetting driver leads to freezes with newer kernel at the moment (> 4.4)
services.xserver.videoDrivers = [ "intel" ];
services.xserver.libinput.enable = true;
hardware.trackpoint.emulateWheel = true;
}