summaryrefslogtreecommitdiffstats
path: root/lenovo
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2017-09-03 23:25:33 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2017-09-03 23:25:33 +0200
commitae18b6af0fa2a244b2e5932b40885ae4b46abff7 (patch)
tree70ab39012d4e46b3b8f02baa3fe9018069a13ff1 /lenovo
parentecbb9c15c30af316fa263ba16a6f35dd78b37222 (diff)
Initialize general.nix; merge defaults into all ThinkPad configurations
Diffstat (limited to 'lenovo')
-rw-r--r--lenovo/general.nix10
-rw-r--r--lenovo/t410.nix2
-rw-r--r--lenovo/t440p.nix2
-rw-r--r--lenovo/t460s.nix11
-rw-r--r--lenovo/x140e.nix8
-rw-r--r--lenovo/x220i-tablet.nix6
-rw-r--r--lenovo/x250.nix3
-rw-r--r--lenovo/z510.nix3
8 files changed, 24 insertions, 21 deletions
diff --git a/lenovo/general.nix b/lenovo/general.nix
new file mode 100644
index 0000000..51d5060
--- /dev/null
+++ b/lenovo/general.nix
@@ -0,0 +1,10 @@
+{ lib, ... }:
+
+with lib;
+
+{
+ hardware.trackpoint = mkDefault {
+ enable = true;
+ emulateWheel = true;
+ };
+}
diff --git a/lenovo/t410.nix b/lenovo/t410.nix
index 912ae66..56e49cb 100644
--- a/lenovo/t410.nix
+++ b/lenovo/t410.nix
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
+ imports = [ ./general.nix ];
+
boot = {
kernelParams = [
# Kernel GPU Savings Options (NOTE i915 chipset only)
diff --git a/lenovo/t440p.nix b/lenovo/t440p.nix
index 47f5f66..af4e764 100644
--- a/lenovo/t440p.nix
+++ b/lenovo/t440p.nix
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
+ imports = [ ./general.nix ];
+
boot = {
extraModprobeConfig = ''
options bbswitch use_acpi_to_detect_card_state=1
diff --git a/lenovo/t460s.nix b/lenovo/t460s.nix
index 4aaed14..da79956 100644
--- a/lenovo/t460s.nix
+++ b/lenovo/t460s.nix
@@ -3,6 +3,7 @@
{
imports =
[ ../lib/kernel-version.nix
+ ./general.nix
];
## BEGIN from generated hardware-configuration
@@ -45,15 +46,5 @@
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
- '';
};
}
diff --git a/lenovo/x140e.nix b/lenovo/x140e.nix
index f825f44..897d473 100644
--- a/lenovo/x140e.nix
+++ b/lenovo/x140e.nix
@@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }:
{
+ imports = [ ./general.nix ];
+
boot = {
# wireless
kernelModules = [ "kvm-amd" "wl" ];
@@ -15,12 +17,6 @@
# video card
services.xserver.videoDrivers = ["ati"];
- # trackpad (touchpad disabled)
- hardware.trackpoint = {
- enable = true;
- emulateWheel = true;
- };
-
# media keys
sound.enableMediaKeys = true;
}
diff --git a/lenovo/x220i-tablet.nix b/lenovo/x220i-tablet.nix
index 7ea8d73..700c87c 100644
--- a/lenovo/x220i-tablet.nix
+++ b/lenovo/x220i-tablet.nix
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
+ imports = [ ./general.nix ];
+
# TPM chip countains a RNG
security.rngd.enable = true;
@@ -15,10 +17,6 @@
# 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;
diff --git a/lenovo/x250.nix b/lenovo/x250.nix
index 40d1fb1..52a4426 100644
--- a/lenovo/x250.nix
+++ b/lenovo/x250.nix
@@ -1,9 +1,10 @@
{ config, pkgs, ... }:
{
+ imports = [ ./general.nix ];
+
# 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;
}
diff --git a/lenovo/z510.nix b/lenovo/z510.nix
index f1f5416..4c45cac 100644
--- a/lenovo/z510.nix
+++ b/lenovo/z510.nix
@@ -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;