Initialize general.nix; merge defaults into all ThinkPad configurations
This commit is contained in:
parent
ecbb9c15c3
commit
ae18b6af0f
10
lenovo/general.nix
Normal file
10
lenovo/general.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
hardware.trackpoint = mkDefault {
|
||||||
|
enable = true;
|
||||||
|
emulateWheel = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./general.nix ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
# Kernel GPU Savings Options (NOTE i915 chipset only)
|
# Kernel GPU Savings Options (NOTE i915 chipset only)
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./general.nix ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
extraModprobeConfig = ''
|
extraModprobeConfig = ''
|
||||||
options bbswitch use_acpi_to_detect_card_state=1
|
options bbswitch use_acpi_to_detect_card_state=1
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ ../lib/kernel-version.nix
|
[ ../lib/kernel-version.nix
|
||||||
|
./general.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
## BEGIN from generated hardware-configuration
|
## BEGIN from generated hardware-configuration
|
||||||
|
@ -45,15 +46,5 @@
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
synaptics.enable = false;
|
synaptics.enable = false;
|
||||||
|
|
||||||
config = ''
|
|
||||||
Section "InputClass"
|
|
||||||
Identifier "Enable libinput for TrackPoint"
|
|
||||||
MatchIsPointer "on"
|
|
||||||
Driver "libinput"
|
|
||||||
Option "ScrollMethod" "button"
|
|
||||||
Option "ScrollButton" "8"
|
|
||||||
EndSection
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./general.nix ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
# wireless
|
# wireless
|
||||||
kernelModules = [ "kvm-amd" "wl" ];
|
kernelModules = [ "kvm-amd" "wl" ];
|
||||||
|
@ -15,12 +17,6 @@
|
||||||
# video card
|
# video card
|
||||||
services.xserver.videoDrivers = ["ati"];
|
services.xserver.videoDrivers = ["ati"];
|
||||||
|
|
||||||
# trackpad (touchpad disabled)
|
|
||||||
hardware.trackpoint = {
|
|
||||||
enable = true;
|
|
||||||
emulateWheel = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# media keys
|
# media keys
|
||||||
sound.enableMediaKeys = true;
|
sound.enableMediaKeys = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./general.nix ];
|
||||||
|
|
||||||
# TPM chip countains a RNG
|
# TPM chip countains a RNG
|
||||||
security.rngd.enable = true;
|
security.rngd.enable = true;
|
||||||
|
|
||||||
|
@ -15,10 +17,6 @@
|
||||||
# hard disk protection if the laptop falls
|
# hard disk protection if the laptop falls
|
||||||
services.hdapsd.enable = true;
|
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
|
# alternatively, touchpad with two-finger scrolling
|
||||||
#services.xserver.libinput.enable = true;
|
#services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./general.nix ];
|
||||||
|
|
||||||
# modesetting driver leads to freezes with newer kernel at the moment (> 4.4)
|
# modesetting driver leads to freezes with newer kernel at the moment (> 4.4)
|
||||||
services.xserver.videoDrivers = [ "intel" ];
|
services.xserver.videoDrivers = [ "intel" ];
|
||||||
|
|
||||||
services.xserver.libinput.enable = true;
|
services.xserver.libinput.enable = true;
|
||||||
hardware.trackpoint.emulateWheel = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# NOTE: this doesn't inherit from the `general.nix`
|
||||||
|
# as z510 is not a ThinkPad
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
Loading…
Reference in a new issue