Commit 44db00e6f1cc
Changed files (5)
hardware/dell-latitude-e6540.nix
@@ -1,8 +1,6 @@
{ config, pkgs, ... }:
{
- hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
-
boot = {
loader.efi.canTouchEfiVariables = true;
kernelParams = [
@@ -16,5 +14,12 @@
"sierra_net" "cdc_mbim" "cdc_ncm"
];
};
+ hardware = {
+ opengl = {
+ enable = true;
+ extraPackages = [ pkgs.vaapiIntel ];
+ driSupport32Bit = true;
+ };
+ };
services.acpid.enable = true;
}
hardware/lenovo-p50.nix
@@ -2,13 +2,17 @@
{
imports = [ ./thinkpad.nix ];
-
- hardware.bluetooth.enable = true;
- hardware.bluetooth.powerOnBoot = true;
- hardware.nvidia.optimus_prime.enable = true;
- hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
- hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
-
+ hardware = {
+ bluetooth = {
+ enable = true;
+ powerOnBoot = true;
+ };
+ nvidia.optimus_prime = {
+ enable = true;
+ nvidiaBusId = "PCI:1:0:0";
+ intelBusId = "PCI:0:2:0";
+ };
+ };
services = {
tlp = {
extraConfig = ''
@@ -35,12 +39,11 @@ DEVICES_TO_DISABLE_ON_DOCK="wifi"
DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
# Make sure it uses the right hard drive
DISK_DEVICES="nvme0n1p2"
-'';
+ '';
};
- };
- services.udev.extraRules = ''
+ udev.extraRules = ''
# Rules for Lenovo Thinkpad WS Dock
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR}=="17ef", ENV{ID_MODEL}=="305a", RUN+="${pkgs.vde-thinkpad}/bin/dock"
- '';
-
+ '';
+ };
}
hardware/thinkpad-t460s.nix
@@ -28,10 +28,10 @@ DEVICES_TO_DISABLE_ON_DOCK="wifi"
DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
# Make sure it uses the right hard drive
DISK_DEVICES="nvme0n1p3"
-'';
+ '';
+ };
+ xserver = {
+ dpi = 128;
};
};
- services.xserver = {
- dpi = 128;
- };
}
hardware/thinkpad-x220.nix
@@ -8,10 +8,14 @@
options iwlwifi 11n_disable=1
'';
};
- security.pam.services.slimlock.fprintAuth = false;
- security.pam.services.slim.fprintAuth = false;
- security.pam.services.login.fprintAuth = false;
- security.pam.services.xscreensaver.fprintAuth = false;
+ security = {
+ pam.services = {
+ slimlock.fprintAuth = false;
+ slim.fprintAuth = false;
+ login.fprintAuth = false;
+ xscreensaver.fprintAuth = false;
+ };
+ };
services = {
fprintd.enable = true;
tlp = {
@@ -24,7 +28,7 @@ CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=50
CPU_BOOST_ON_AC=1
-CPU_BOOST_ON_BAT=0
+CPU_BOOST_ON_BAT=0
# DEVICES (wifi, ..)
DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
@@ -37,15 +41,15 @@ DEVICES_TO_ENABLE_ON_LAN_DISCONNECT=""
DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
DISK_IDLE_SECS_ON_AC=0
-DISK_IDLE_SECS_ON_BAT=2
+DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
-MAX_LOST_WORK_SECS_ON_BAT=60
+MAX_LOST_WORK_SECS_ON_BAT=60
DISK_DEVICES="ata-Corsair_Force_LX_SSD_15256501000102160059"
SOUND_POWER_SAVE_ON_AC=0
-SOUND_POWER_SAVE_ON_BAT=1
+SOUND_POWER_SAVE_ON_BAT=1
USB_AUTOSUSPEND=1
-USB_BLACKLIST_BTUSB=1
-'';
+USB_BLACKLIST_BTUSB=1
+ '';
};
};
}
hardware/thinkpad.nix
@@ -2,7 +2,16 @@
{
boot = {
- loader.efi.canTouchEfiVariables = true;
+ blacklistedKernelModules = [
+ # Kernel GPU Savings Options (NOTE i915 chipset only)
+ "sierra_net" "cdc_mbim" "cdc_ncm"
+ ];
+ extraModprobeConfig = ''
+ options snd_hda_intel power_save=1
+ '';
+ initrd = {
+ availableKernelModules = [ "aesni-intel" "aes_x86_64" "cryptd" ];
+ };
kernelModules = [ "kvm_intel" ];
kernelParams = [
# Kernel GPU Savings Options (NOTE i915 chipset only)
@@ -12,19 +21,11 @@
"kvm_intel.nested=1"
"intel_iommu=on"
];
- blacklistedKernelModules = [
- # Kernel GPU Savings Options (NOTE i915 chipset only)
- "sierra_net" "cdc_mbim" "cdc_ncm"
- ];
- initrd = {
- availableKernelModules = [ "aesni-intel" "aes_x86_64" "cryptd" ];
- };
+ loader.efi.canTouchEfiVariables = true;
};
-
environment.systemPackages = with pkgs; [
linuxPackages.tp_smapi
];
-
hardware = {
trackpoint.enable = false;
cpu.intel.updateMicrocode = true;
@@ -34,7 +35,6 @@
driSupport32Bit = true;
};
};
-
services = {
acpid = {
enable = true;
@@ -48,30 +48,27 @@ fi
tlp = {
enable = true;
};
- };
- services.xserver = {
- synaptics.enable = false;
- config =
- ''
-Section "InputClass"
- Identifier "Enable libinput for TrackPoint"
- MatchIsPointer "on"
- Driver "libinput"
- Option "ScrollMethod" "button"
- Option "ScrollButton" "8"
-EndSection
- '';
- inputClassSections = [
+ xserver = {
+ synaptics.enable = false;
+ config =
''
-Identifier "evdev touchpad off"
-MatchIsTouchpad "on"
-MatchDevicePath "/dev/input/event*"
-Driver "evdev"
-Option "Ignore" "true"
- ''
- ];
+ Section "InputClass"
+ Identifier "Enable libinput for TrackPoint"
+ MatchIsPointer "on"
+ Driver "libinput"
+ Option "ScrollMethod" "button"
+ Option "ScrollButton" "8"
+ EndSection
+ '';
+ inputClassSections = [
+ ''
+ Identifier "evdev touchpad off"
+ MatchIsTouchpad "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+ Option "Ignore" "true"
+ ''
+ ];
+ };
};
- boot.extraModprobeConfig = ''
- options snd_hda_intel power_save=1
- '';
}