summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ericson <jericson@galois.com>2016-10-20 14:12:49 -0400
committerJohn Ericson <jericson@galois.com>2016-10-20 14:12:49 -0400
commit57c4f92f2e1b18329b8c055e8f212762be3eb26c (patch)
tree4ae740826fd08f9cf87e0c7f62bc1bb1a7ff60ac
parenta2b20351e0557192f7be9c40fb5ead04e9fa9dfc (diff)
parentcfd63d3b3e15fd440701dbbd25d57effe379b87d (diff)
Merge branch 'master' of github.com:NixOS/nixos-hardware
-rw-r--r--lenovo/t460s.nix59
-rw-r--r--lenovo/x140e.nix26
-rw-r--r--lenovo/z510.nix8
3 files changed, 93 insertions, 0 deletions
diff --git a/lenovo/t460s.nix b/lenovo/t460s.nix
new file mode 100644
index 0000000..4aaed14
--- /dev/null
+++ b/lenovo/t460s.nix
@@ -0,0 +1,59 @@
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [ ../lib/kernel-version.nix
+ ];
+
+ ## BEGIN from generated hardware-configuration
+ ## Probably better to just use a freshly generated hardware.configuration.nix
+ ## than this, but including for reference.
+ # boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
+ # boot.kernelModules = [ "kvm-intel" ];
+ # boot.extraModulePackages = [ ];
+ #
+ #
+ # nix.maxJobs = lib.mkDefault 4;
+ ## END from generated hardware-configuration
+
+ # Use the gummiboot efi boot loader. (From default generated configuration.nix)
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ # https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T460s
+ kernelAtleast = [
+ { version = "4.5.1"; msg = "The physical mouse buttons works incorrectly."; }
+ { 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):
+
+ # Resolution: 2560 x 1440 px
+ # Size: 12.2" × 6.86" (30.99cm × 17.43cm)
+ # DPI: 209.8
+ # Dot Pitch: 0.1211mm
+ # 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
+ '';
+ };
+}
diff --git a/lenovo/x140e.nix b/lenovo/x140e.nix
new file mode 100644
index 0000000..f825f44
--- /dev/null
+++ b/lenovo/x140e.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+{
+ boot = {
+ # wireless
+ kernelModules = [ "kvm-amd" "wl" ];
+ extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
+
+ # audio device
+ extraModprobeConfig = ''
+ options snd_hda_intel enable=0,1
+ '';
+ };
+
+ # video card
+ services.xserver.videoDrivers = ["ati"];
+
+ # trackpad (touchpad disabled)
+ hardware.trackpoint = {
+ enable = true;
+ emulateWheel = true;
+ };
+
+ # media keys
+ sound.enableMediaKeys = true;
+}
diff --git a/lenovo/z510.nix b/lenovo/z510.nix
new file mode 100644
index 0000000..f1f5416
--- /dev/null
+++ b/lenovo/z510.nix
@@ -0,0 +1,8 @@
+{ config, pkgs, ... }:
+{
+ hardware.cpu.intel.updateMicrocode = true;
+
+ # see https://github.com/NixOS/nixpkgs/issues/18356
+ # found buggy driver with method https://wiki.ubuntu.com/DebuggingKernelSuspend
+ boot.blacklistedKernelModules = [ "nouveau" ];
+}