From 3c9f432a7146115b2d0b6200c4c19101c29caaba Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Fri, 22 Dec 2017 20:17:00 +0300 Subject: treewide: modules -> profiles, separate dirs, list in README (#29) Enforce proper naming: all paths are lowercase and hyphen-separated, if there's a line of models (aspire, macbook-pro, thinkpad) it becomes a subdirectory. Documentation for profiles is moved to README files in respective directories. Add an Org mode table that lists all available profiles and their paths. Instead of fetching repo locally, use a Nix channel. Making hardware profiles read-only should improve quality and amount of participation long-term. --- README.md | 24 ------- README.org | 47 ++++++++++++++ acer/4810t.nix | 37 ----------- acer/4810t.wiki | 110 -------------------------------- acer/aspire/4810t/README.wiki | 110 ++++++++++++++++++++++++++++++++ acer/aspire/4810t/default.nix | 37 +++++++++++ acer/c720.nix | 10 --- acer/c720.wiki | 23 ------- acer/c720/README.wiki | 23 +++++++ acer/c720/default.nix | 10 +++ airis/n990.nix | 22 ------- airis/n990/default.nix | 22 +++++++ apple/macbook-pro-10-1.nix | 27 -------- apple/macbook-pro-10-1.wiki | 9 --- apple/macbook-pro-12-1.nix | 17 ----- apple/macbook-pro/10-1/README.wiki | 9 +++ apple/macbook-pro/10-1/default.nix | 27 ++++++++ apple/macbook-pro/12-1/default.nix | 17 +++++ asus/m60j-jx041v.wiki | 98 ---------------------------- asus/m60j-jx041v/README.wiki | 98 ++++++++++++++++++++++++++++ asus/wireless-ac1300.nix | 2 + dell/xps-15-9550.nix | 25 -------- dell/xps-15-9550.wiki | 38 ----------- dell/xps/15-9550/README.wiki | 38 +++++++++++ dell/xps/15-9550/default.nix | 25 ++++++++ inversepath/usbarmory/configuration.nix | 61 ------------------ inversepath/usbarmory/default.nix | 61 ++++++++++++++++++ lenovo/ideapad/z510.nix | 9 --- lenovo/ideapad/z510/default.nix | 9 +++ lenovo/thinkpad/common.nix | 11 ++++ lenovo/thinkpad/general-intel.nix | 4 -- lenovo/thinkpad/general.nix | 11 ---- lenovo/thinkpad/intel.nix | 4 ++ lenovo/thinkpad/t410.nix | 91 -------------------------- lenovo/thinkpad/t410/default.nix | 91 ++++++++++++++++++++++++++ lenovo/thinkpad/t440p.nix | 12 ---- lenovo/thinkpad/t440p/default.nix | 12 ++++ lenovo/thinkpad/t460s.nix | 29 --------- lenovo/thinkpad/t460s/default.nix | 29 +++++++++ lenovo/thinkpad/x140e.nix | 19 ------ lenovo/thinkpad/x140e/default.nix | 19 ++++++ lenovo/thinkpad/x220/default.nix | 22 +++++++ lenovo/thinkpad/x220i-tablet.nix | 22 ------- microsoft/hyper-v-guest.md | 63 ------------------ microsoft/hyper-v/README.md | 63 ++++++++++++++++++ microsoft/surface-pro/3/README.wiki | 41 ++++++++++++ microsoft/surface-pro/3/default.nix | 8 +++ microsoft/surface_pro_3.nix | 8 --- microsoft/surface_pro_3.wiki | 41 ------------ raspberry-pi/2/default.nix | 64 +++++++++++++++++++ raspberry_pi/rpi2.nix | 64 ------------------- samsung/np900x3c.nix | 13 ---- samsung/np900x3c.wiki | 94 --------------------------- samsung/np900x3c/README.wiki | 94 +++++++++++++++++++++++++++ samsung/np900x3c/default.nix | 13 ++++ supermicro/a1sri-2758f.nix | 20 ------ supermicro/a1sri-2758f/default.nix | 20 ++++++ supermicro/x10sll-f.nix | 14 ---- supermicro/x10sll-f/default.nix | 14 ++++ 59 files changed, 1040 insertions(+), 1015 deletions(-) delete mode 100644 README.md create mode 100644 README.org delete mode 100644 acer/4810t.nix delete mode 100644 acer/4810t.wiki create mode 100644 acer/aspire/4810t/README.wiki create mode 100644 acer/aspire/4810t/default.nix delete mode 100644 acer/c720.nix delete mode 100644 acer/c720.wiki create mode 100644 acer/c720/README.wiki create mode 100644 acer/c720/default.nix delete mode 100644 airis/n990.nix create mode 100644 airis/n990/default.nix delete mode 100644 apple/macbook-pro-10-1.nix delete mode 100644 apple/macbook-pro-10-1.wiki delete mode 100644 apple/macbook-pro-12-1.nix create mode 100644 apple/macbook-pro/10-1/README.wiki create mode 100644 apple/macbook-pro/10-1/default.nix create mode 100644 apple/macbook-pro/12-1/default.nix delete mode 100644 asus/m60j-jx041v.wiki create mode 100644 asus/m60j-jx041v/README.wiki delete mode 100644 dell/xps-15-9550.nix delete mode 100644 dell/xps-15-9550.wiki create mode 100644 dell/xps/15-9550/README.wiki create mode 100644 dell/xps/15-9550/default.nix delete mode 100644 inversepath/usbarmory/configuration.nix create mode 100644 inversepath/usbarmory/default.nix delete mode 100644 lenovo/ideapad/z510.nix create mode 100644 lenovo/ideapad/z510/default.nix create mode 100644 lenovo/thinkpad/common.nix delete mode 100644 lenovo/thinkpad/general-intel.nix delete mode 100644 lenovo/thinkpad/general.nix create mode 100644 lenovo/thinkpad/intel.nix delete mode 100644 lenovo/thinkpad/t410.nix create mode 100644 lenovo/thinkpad/t410/default.nix delete mode 100644 lenovo/thinkpad/t440p.nix create mode 100644 lenovo/thinkpad/t440p/default.nix delete mode 100644 lenovo/thinkpad/t460s.nix create mode 100644 lenovo/thinkpad/t460s/default.nix delete mode 100644 lenovo/thinkpad/x140e.nix create mode 100644 lenovo/thinkpad/x140e/default.nix create mode 100644 lenovo/thinkpad/x220/default.nix delete mode 100644 lenovo/thinkpad/x220i-tablet.nix delete mode 100644 microsoft/hyper-v-guest.md create mode 100644 microsoft/hyper-v/README.md create mode 100644 microsoft/surface-pro/3/README.wiki create mode 100644 microsoft/surface-pro/3/default.nix delete mode 100644 microsoft/surface_pro_3.nix delete mode 100644 microsoft/surface_pro_3.wiki create mode 100644 raspberry-pi/2/default.nix delete mode 100644 raspberry_pi/rpi2.nix delete mode 100644 samsung/np900x3c.nix delete mode 100644 samsung/np900x3c.wiki create mode 100644 samsung/np900x3c/README.wiki create mode 100644 samsung/np900x3c/default.nix delete mode 100644 supermicro/a1sri-2758f.nix create mode 100644 supermicro/a1sri-2758f/default.nix delete mode 100644 supermicro/x10sll-f.nix create mode 100644 supermicro/x10sll-f/default.nix diff --git a/README.md b/README.md deleted file mode 100644 index f697a7b..0000000 --- a/README.md +++ /dev/null @@ -1,24 +0,0 @@ -A collection of NixOS modules covering hardware quirks. - -## Usage -The simplest way to use this repo for now is to clone locally and include by path: -``` nix -{ config, pkgs, ... }: - -{ - imports = - [ /home/user/nixos-hardware/acme/thunkpad-2000.nix ]; -} -``` - -Modules should favor usability and stability, so performance hacks -should be activated by an additional a NixOS option or conservative -and performance configs can be declared in seperate modules. - -Because modules can only be tested with the appropriate hardware, -quality assurance is up to **you**. - -## Simple tips and tricks - -### Disable PC speaker -```boot.blacklistedKernelModules = [ "pcspkr" ];``` diff --git a/README.org b/README.org new file mode 100644 index 0000000..97df02c --- /dev/null +++ b/README.org @@ -0,0 +1,47 @@ +NixOS profiles covering hardware quirks. + +Add a new channel: + + : $ sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware + : $ sudo nix-channel --update nixos-hardware + +Then add an appropriate profile path to ~imports~ in +~/etc/nixos/configuration.nix~. Currently available profiles: + +| Model | Path | +|---------------------------+--------------------------------------------| +| Acer Aspire 4810T | ~~ | +| Acer C720 | ~~ | +| Airis N990 | ~~ | +| Apple MacBook Pro 10,1 | ~~ | +| Apple MacBook Pro 12,1 | ~~ | +| Dell XPS 15 9550 | ~~ | +| Inverse Path USB armory | ~~ | +| Lenovo IdeaPad Z510 | ~~ | +| Lenovo ThinkPad T410 | ~~ | +| Lenovo ThinkPad T440p | ~~ | +| Lenovo ThinkPad T460s | ~~ | +| Lenovo ThinkPad X140e | ~~ | +| Lenovo ThinkPad X220 | ~~ | +| Microsoft Surface Pro 3 | ~~ | +| Raspberry Pi 2 | ~~ | +| Samsung Series 9 NP900X3C | ~~ | +| Supermicro A1SRi-2758F | ~~ | +| Supermicro X10SLL-F | ~~ | + +For example, to enable ThinkPad X220 profile, your ~imports~ should look like: + + : imports = [ ./hardware-configuration.nix ]; + +Profiles should favor usability and stability, so performance hacks should be +activated by an additional NixOS option or conservative and performance configs +can be declared in seperate profiles. + +Because profiles can only be tested with the appropriate hardware, quality +assurance is up to *you*. + +** Simple tips and tricks + +*** Disable PC speaker + + : boot.blacklistedKernelModules = [ "pcspkr" ]; diff --git a/acer/4810t.nix b/acer/4810t.nix deleted file mode 100644 index ce1091b..0000000 --- a/acer/4810t.nix +++ /dev/null @@ -1,37 +0,0 @@ -/* imported from https://nixos.org/wiki/Acer_4810T */ - -{ config, pkgs, lib, ... }: - -{ - # Make te network WLAN card (wlan0) firmware available - require = [ /nixos/modules/hardware/network/intel-5000.nix ]; - - boot = rec { - initrd.kernelModules = [ "ata_piix" ]; - kernelParams = [ - "apm=on" - "acpi=on" - "vga=0x317" - "video=vesafb:ywrap" - # Important, to disable Kernel Mode Setting for the graphics card - # This will allow backlight regulation - "nomodeset" - ]; - kernelModules = [ - "kvm-intel" - ]; - }; - - services = { - xserver = { - enable = true; - defaultDepth = 24; - videoDriver = "intel"; - autorun = true; - driSupport = false; - synaptics = { - enable = true; - dev = "/dev/input/event8"; - }; - }; -}; diff --git a/acer/4810t.wiki b/acer/4810t.wiki deleted file mode 100644 index 0b045b6..0000000 --- a/acer/4810t.wiki +++ /dev/null @@ -1,110 +0,0 @@ -= Overview = -* CPU: Intel Core 2 Solo U3500 @ 1.40GHz (speeds: 0.8, 1.2 and 1.4GHz), 3MB L2 -* Screen: 1366x768 LED - -= BIOS versions = -* 1.10 - average ACPI temperature around 34°C, good GL playing -* 1.20 - average ACPI temperature around 39°C, good GL playing -* 1.31 - big slowdown in X windows from time to time, GL games with annoying slowdowns regularly - -The most recent BIOS updates (1.20 onwards) come with a DOS flasher; older come only with a windows flasher. I used a [http://www.pcengines.ch/freedos.htm freedos image] stored in a USB flash memory to boot freedos and flash the BIOS. - -= Drivers = -All provided in linux 2.6.32 kernels. - -Linux 2.6.29 has problems at least with the wire ethernet card (Attansic Technology Corp. Device 1063). Loading and unloading the ethernet card driver module (atl1c) helps getting a working link, although it will change from eth0 to eth1, eth2, or another interface name. - -== lspci == - 00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07) - 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) - 00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) - 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03) - 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03) - 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03) - 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03) - 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03) - 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03) - 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) - 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) - 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) - 00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03) - 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) - 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93) - 00:1f.0 ISA bridge: Intel Corporation ICH9M-E LPC Interface Controller (rev 03) - 00:1f.2 IDE interface: Intel Corporation ICH9M/M-E 2 port SATA IDE Controller (rev 03) - 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03) - 00:1f.5 IDE interface: Intel Corporation ICH9M/M-E 2 port SATA IDE Controller (rev 03) - 00:1f.6 Signal processing controller: Intel Corporation 82801I (ICH9 Family) Thermal Subsystem (rev 03) - 01:00.0 Ethernet controller: Attansic Technology Corp. Device 1063 (rev c0) - 02:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100 - -= Configuration = - - { - # Make te network WLAN card (wlan0) firmware available - require = [ ./nixos/modules/hardware/network/intel-5000.nix ]; - - boot = rec { - initrd = { - kernelModules = [ "ata_piix" "reiserfs" ]; - }; - kernelParams = [ - "selinux=0" - "apm=on" - "acpi=on" - "vga=0x317" - "console=tty1" - "video=vesafb:ywrap" - # Important, to disable Kernel Mode Setting for the graphics card - # This will allow backlight regulation - "nomodeset" - ]; - kernelModules = [ - "acpi-cpufreq" - "cpufreq-ondemand" # not autoloaded in 2.6.32.2 - "kvm-intel" - ]; - resumeDevice = "8:2"; - extraKernelParams = ["resume=/dev/sda2"]; - kernelPackages = pkgs.kernelPackages_2_6_32; - postBootCommands = '' - echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - ''; - }; - - services = { - xserver = { - enable = true; - defaultDepth = 24; - videoDriver = "intel"; - exportConfiguration = true; - enableTCP = true; - autorun = true; - driSupport = false; - synaptics = { - enable = true; - dev = "/dev/input/event8"; - }; - }; - }; - -= X settings = - -== Backlight == -Having disabled Kernel Mode Setting for the i915 kernel drm module (kernel parameter ''nomodeset''), use ''xrandr'' to set: - xrandr --output LVDS --set BACKLIGHT_CONTROL combination - xrandr --output LVDS --set BACKLIGHT 300 # ~1000, max light. - -If those steps make your mouse cursor not appear, switch to another VT, and then back to X, and it will come. - -== Synaptics pad == -I like the pad speed set by: - synclient MaxTapTime=0 MaxSpeed=1.12 MinSpeed=0.6 AccelFactor=0.001 VertEdgeScroll=1 -Install the ''xf86-input-synaptics-1.2.0'' for ''synclient'' to be in your PATH. - -= Suspending and hibernating = -Usual pm-utils work, with pm-suspend and pm-hibernate. - -[[Category:Installation]] -[[Category:Hardware]] -[[Category:Laptops]] diff --git a/acer/aspire/4810t/README.wiki b/acer/aspire/4810t/README.wiki new file mode 100644 index 0000000..0b045b6 --- /dev/null +++ b/acer/aspire/4810t/README.wiki @@ -0,0 +1,110 @@ += Overview = +* CPU: Intel Core 2 Solo U3500 @ 1.40GHz (speeds: 0.8, 1.2 and 1.4GHz), 3MB L2 +* Screen: 1366x768 LED + += BIOS versions = +* 1.10 - average ACPI temperature around 34°C, good GL playing +* 1.20 - average ACPI temperature around 39°C, good GL playing +* 1.31 - big slowdown in X windows from time to time, GL games with annoying slowdowns regularly + +The most recent BIOS updates (1.20 onwards) come with a DOS flasher; older come only with a windows flasher. I used a [http://www.pcengines.ch/freedos.htm freedos image] stored in a USB flash memory to boot freedos and flash the BIOS. + += Drivers = +All provided in linux 2.6.32 kernels. + +Linux 2.6.29 has problems at least with the wire ethernet card (Attansic Technology Corp. Device 1063). Loading and unloading the ethernet card driver module (atl1c) helps getting a working link, although it will change from eth0 to eth1, eth2, or another interface name. + +== lspci == + 00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07) + 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) + 00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) + 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03) + 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03) + 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03) + 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03) + 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03) + 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03) + 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) + 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) + 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) + 00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03) + 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) + 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93) + 00:1f.0 ISA bridge: Intel Corporation ICH9M-E LPC Interface Controller (rev 03) + 00:1f.2 IDE interface: Intel Corporation ICH9M/M-E 2 port SATA IDE Controller (rev 03) + 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03) + 00:1f.5 IDE interface: Intel Corporation ICH9M/M-E 2 port SATA IDE Controller (rev 03) + 00:1f.6 Signal processing controller: Intel Corporation 82801I (ICH9 Family) Thermal Subsystem (rev 03) + 01:00.0 Ethernet controller: Attansic Technology Corp. Device 1063 (rev c0) + 02:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100 + += Configuration = + + { + # Make te network WLAN card (wlan0) firmware available + require = [ ./nixos/modules/hardware/network/intel-5000.nix ]; + + boot = rec { + initrd = { + kernelModules = [ "ata_piix" "reiserfs" ]; + }; + kernelParams = [ + "selinux=0" + "apm=on" + "acpi=on" + "vga=0x317" + "console=tty1" + "video=vesafb:ywrap" + # Important, to disable Kernel Mode Setting for the graphics card + # This will allow backlight regulation + "nomodeset" + ]; + kernelModules = [ + "acpi-cpufreq" + "cpufreq-ondemand" # not autoloaded in 2.6.32.2 + "kvm-intel" + ]; + resumeDevice = "8:2"; + extraKernelParams = ["resume=/dev/sda2"]; + kernelPackages = pkgs.kernelPackages_2_6_32; + postBootCommands = '' + echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + ''; + }; + + services = { + xserver = { + enable = true; + defaultDepth = 24; + videoDriver = "intel"; + exportConfiguration = true; + enableTCP = true; + autorun = true; + driSupport = false; + synaptics = { + enable = true; + dev = "/dev/input/event8"; + }; + }; + }; + += X settings = + +== Backlight == +Having disabled Kernel Mode Setting for the i915 kernel drm module (kernel parameter ''nomodeset''), use ''xrandr'' to set: + xrandr --output LVDS --set BACKLIGHT_CONTROL combination + xrandr --output LVDS --set BACKLIGHT 300 # ~1000, max light. + +If those steps make your mouse cursor not appear, switch to another VT, and then back to X, and it will come. + +== Synaptics pad == +I like the pad speed set by: + synclient MaxTapTime=0 MaxSpeed=1.12 MinSpeed=0.6 AccelFactor=0.001 VertEdgeScroll=1 +Install the ''xf86-input-synaptics-1.2.0'' for ''synclient'' to be in your PATH. + += Suspending and hibernating = +Usual pm-utils work, with pm-suspend and pm-hibernate. + +[[Category:Installation]] +[[Category:Hardware]] +[[Category:Laptops]] diff --git a/acer/aspire/4810t/default.nix b/acer/aspire/4810t/default.nix new file mode 100644 index 0000000..ce1091b --- /dev/null +++ b/acer/aspire/4810t/default.nix @@ -0,0 +1,37 @@ +/* imported from https://nixos.org/wiki/Acer_4810T */ + +{ config, pkgs, lib, ... }: + +{ + # Make te network WLAN card (wlan0) firmware available + require = [ /nixos/modules/hardware/network/intel-5000.nix ]; + + boot = rec { + initrd.kernelModules = [ "ata_piix" ]; + kernelParams = [ + "apm=on" + "acpi=on" + "vga=0x317" + "video=vesafb:ywrap" + # Important, to disable Kernel Mode Setting for the graphics card + # This will allow backlight regulation + "nomodeset" + ]; + kernelModules = [ + "kvm-intel" + ]; + }; + + services = { + xserver = { + enable = true; + defaultDepth = 24; + videoDriver = "intel"; + autorun = true; + driSupport = false; + synaptics = { + enable = true; + dev = "/dev/input/event8"; + }; + }; +}; diff --git a/acer/c720.nix b/acer/c720.nix deleted file mode 100644 index 4836089..0000000 --- a/acer/c720.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ lib, ... }: -with lib; -{ - imports = singleton ../lib/kernerl-version.nix; - - kernelAtleast = singleton - { version = "3.18"; - msg = "Cypress APA touchpad supported added in Linux-3.17-rc1"; - }; -} diff --git a/acer/c720.wiki b/acer/c720.wiki deleted file mode 100644 index 5200ab6..0000000 --- a/acer/c720.wiki +++ /dev/null @@ -1,23 +0,0 @@ -= Overview = -* Processor: Intel Celeron 2955U @ 1.40GHz -* Network controller: Qualcomm Atheros AR9462 - -= Configuration = -The C720 comes with a Cypress APA touchpad. Support for this touchpad was added in kernel 3.17-rc1. -In order to get the touchpad working CONFIG_CHROME_PLATFORMS needs to be enabled. - -For example, for touchpad support with the 3.18 kernel, the following should be added to /etc/nixos/configuration.nix: - - boot.kernelPackages = pkgs.linuxPackages_3_18; - nixpkgs.config.packageOverrides = pkgs: - { linux_3_18 = pkgs.linux_3_18.override { - extraConfig = - ''''''' - CHROME_PLATFORMS y - '''''''; - }; - }; - -[[Category:Installation]] -[[Category:Hardware]] -[[Category:Laptops]] diff --git a/acer/c720/README.wiki b/acer/c720/README.wiki new file mode 100644 index 0000000..5200ab6 --- /dev/null +++ b/acer/c720/README.wiki @@ -0,0 +1,23 @@ += Overview = +* Processor: Intel Celeron 2955U @ 1.40GHz +* Network controller: Qualcomm Atheros AR9462 + += Configuration = +The C720 comes with a Cypress APA touchpad. Support for this touchpad was added in kernel 3.17-rc1. +In order to get the touchpad working CONFIG_CHROME_PLATFORMS needs to be enabled. + +For example, for touchpad support with the 3.18 kernel, the following should be added to /etc/nixos/configuration.nix: + + boot.kernelPackages = pkgs.linuxPackages_3_18; + nixpkgs.config.packageOverrides = pkgs: + { linux_3_18 = pkgs.linux_3_18.override { + extraConfig = + ''''''' + CHROME_PLATFORMS y + '''''''; + }; + }; + +[[Category:Installation]] +[[Category:Hardware]] +[[Category:Laptops]] diff --git a/acer/c720/default.nix b/acer/c720/default.nix new file mode 100644 index 0000000..4836089 --- /dev/null +++ b/acer/c720/default.nix @@ -0,0 +1,10 @@ +{ lib, ... }: +with lib; +{ + imports = singleton ../lib/kernerl-version.nix; + + kernelAtleast = singleton + { version = "3.18"; + msg = "Cypress APA touchpad supported added in Linux-3.17-rc1"; + }; +} diff --git a/airis/n990.nix b/airis/n990.nix deleted file mode 100644 index b3056b7..0000000 --- a/airis/n990.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ ... }: - -{ - boot = { - initrd.kernelModules = [ "pata_via" ]; - - kernelParams = [ - "apm=on" - "acpi=on" - "vga=0x317" # 1024x768 - "console=tty1" - "video=vesafb:ywrap" # Faster scroll - ]; - }; - - services.xserver = { - videoDriver = "unichrome"; - synaptics.enable = true; - }; - - networking.enableIntel2200BGFirmware = true; -} diff --git a/airis/n990/default.nix b/airis/n990/default.nix new file mode 100644 index 0000000..b3056b7 --- /dev/null +++ b/airis/n990/default.nix @@ -0,0 +1,22 @@ +{ ... }: + +{ + boot = { + initrd.kernelModules = [ "pata_via" ]; + + kernelParams = [ + "apm=on" + "acpi=on" + "vga=0x317" # 1024x768 + "console=tty1" + "video=vesafb:ywrap" # Faster scroll + ]; + }; + + services.xserver = { + videoDriver = "unichrome"; + synaptics.enable = true; + }; + + networking.enableIntel2200BGFirmware = true; +} diff --git a/apple/macbook-pro-10-1.nix b/apple/macbook-pro-10-1.nix deleted file mode 100644 index 797404e..0000000 --- a/apple/macbook-pro-10-1.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = - [ ../lib/kernel-version.nix - ]; - - # Use the systemd-boot efi boot loader. (From default generated configuration.nix) - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # I use this but not sure whether its needed. - # Right click does *NOT* work - services.xserver.libinput.enable = true; - - kernelAtleast = - [ { version = "4.7"; msg = "Broadcom WiFi confirmed not to work."; } - ]; - - # Couldn't get X to work with nvidia - # Also, PTYs don't work after X/nvidia starts - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.opengl.driSupport32Bit = true; - - # Seems to improve battery life *and* keep the CPU cooler - services.mbpfan.enable = true; -} diff --git a/apple/macbook-pro-10-1.wiki b/apple/macbook-pro-10-1.wiki deleted file mode 100644 index 149b30e..0000000 --- a/apple/macbook-pro-10-1.wiki +++ /dev/null @@ -1,9 +0,0 @@ -= Apple MacBook Pro 10,1 = - -I presume the associated configuration also will work with to other 10,x models. - -If you don't have an Ethernet adapter, make sure your NixOS installer has a sufficiently modern kernel or you will be stuck without internet and unable to installer. - -Note that (with NixPkgs circa late October 2016) Linux 4.8.1 does not work: everything will boot through X, but then manually-run commands accessing peripherals (nmcli, lspci, etc) will hang inexplicably. - -Thankfully no tweaking of the BIOS or similar was needed. Do note that if your MacOS partition is encrypted, you will have an easier time shrinking it from within MacOS, but this is standard advice. diff --git a/apple/macbook-pro-12-1.nix b/apple/macbook-pro-12-1.nix deleted file mode 100644 index c755ce0..0000000 --- a/apple/macbook-pro-12-1.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - imports = - [ - - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - # The USB subsystem wakes up the MBP directly after suspend if - # we don't disable it. - services.udev.extraRules = '' - SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled" - ''; -} diff --git a/apple/macbook-pro/10-1/README.wiki b/apple/macbook-pro/10-1/README.wiki new file mode 100644 index 0000000..149b30e --- /dev/null +++ b/apple/macbook-pro/10-1/README.wiki @@ -0,0 +1,9 @@ += Apple MacBook Pro 10,1 = + +I presume the associated configuration also will work with to other 10,x models. + +If you don't have an Ethernet adapter, make sure your NixOS installer has a sufficiently modern kernel or you will be stuck without internet and unable to installer. + +Note that (with NixPkgs circa late October 2016) Linux 4.8.1 does not work: everything will boot through X, but then manually-run commands accessing peripherals (nmcli, lspci, etc) will hang inexplicably. + +Thankfully no tweaking of the BIOS or similar was needed. Do note that if your MacOS partition is encrypted, you will have an easier time shrinking it from within MacOS, but this is standard advice. diff --git a/apple/macbook-pro/10-1/default.nix b/apple/macbook-pro/10-1/default.nix new file mode 100644 index 0000000..797404e --- /dev/null +++ b/apple/macbook-pro/10-1/default.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + imports = + [ ../lib/kernel-version.nix + ]; + + # Use the systemd-boot efi boot loader. (From default generated configuration.nix) + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # I use this but not sure whether its needed. + # Right click does *NOT* work + services.xserver.libinput.enable = true; + + kernelAtleast = + [ { version = "4.7"; msg = "Broadcom WiFi confirmed not to work."; } + ]; + + # Couldn't get X to work with nvidia + # Also, PTYs don't work after X/nvidia starts + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.opengl.driSupport32Bit = true; + + # Seems to improve battery life *and* keep the CPU cooler + services.mbpfan.enable = true; +} diff --git a/apple/macbook-pro/12-1/default.nix b/apple/macbook-pro/12-1/default.nix new file mode 100644 index 0000000..c755ce0 --- /dev/null +++ b/apple/macbook-pro/12-1/default.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: +{ + imports = + [ + + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + # The USB subsystem wakes up the MBP directly after suspend if + # we don't disable it. + services.udev.extraRules = '' + SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled" + ''; +} diff --git a/asus/m60j-jx041v.wiki b/asus/m60j-jx041v.wiki deleted file mode 100644 index 51a0cd1..0000000 --- a/asus/m60j-jx041v.wiki +++ /dev/null @@ -1,98 +0,0 @@ -This page is a work in progress. - -= Overview = - -Most of the features seem to be working with Linux 2.6.32. - -== Hardware == - -* Ethernet: Attansic Technology Corp. Device 1063 (rev c0) -* Wireless: Intel Corporation Wifi Link 100 Series -* Bluetooth: -* Sound: Realtek ALC269 -* Video: nVidia GeForce GT 240M -* Video RAM: 1GB DDR3 -* CPU: Core i7 720 QM (4 core, 2 threads per core) -* RAM: 4 GB -* HDD: 2* 320 GB, 5200 rpm. -* Fingerprint Sensor. - -== Support == - -* Ethernet: Yes. -* Wireless: Yes. -* Bluetooth: Yes. -* Sound: Yes. -* Video: Yes. (dual screen working fine) -* Software Raid: Yes. -* Keyboard: some Function (Fn) keys are not recognized / mapped correctly. -* Fingerprint Sensor: Not tested. (listed by lshal) - -== Tests == - -* Video: -** Maximal Resolution: 1366x768 -** glxgears: 1859.8 FPS @ 1366x768 - -= Configuration = - -You can see the configuration file specific to this computer at [https://svn.nixos.org/repos/nix/configurations/trunk/computer/asus/m60j/jx041v.nix configurations/computer/asus/m60j/jx041v.nix] - -= Problems & Solutions = - -== No Ethernet == - -This problem appear if you are using an old kernel. - -
[root@nixos:]# lspci -v | sed -n '/Ethernet/ { :loop p; n; s/^$//; T loop; q}'
-07:00.0 Ethernet controller: Attansic Technology Corp. Device 1063 (rev c0)
-        ...
-        Kernel driver in use: atl1c
-        Kernel modules: atl1c
-
- -While searching on the web you find that this ethernet device need the kernel module atl1e instead of atl1c. The following sources explain how to unpack & compile & install such module on usual distributions. As we are on a NixOS, things are a bit different. - -To follow the instruction you need to find a way to copy the module sources of AR81Family-linux-v1.0.0.10.tar.gz ([http://www.backtrack.it/~emgent/hackstuff/Attansic/ http://www.backtrack.it/~emgent/hackstuff/Attansic/]) on the targeted device. - -
-# avoid messing up your term
-[root@nixos:]# initctl stop dhclient
-# add dependencies in the environment
-[root@nixos:]# nix-env -i gcc gnumake
-[root@nixos:]# ln -s /nix/store/*-linux-$(uname -r)/lib /lib
-# unpack & compile
-[root@nixos:]# mkdir /tmp/AR81Family-linux
-[root@nixos:]# cp .../AR81Family-linux-v1.0.0.10.tar.gz .
-[root@nixos:]# yes y | tar xzf AR81Family-linux-v1.0.0.10.tar.gz
-[root@nixos:]# cd src
-[root@nixos:]# make
-# Replace the current module
-[root@nixos:]# rmmod atl1c
-[root@nixos:]# modprobe /tmp/AR81Family-linux/src/atl1e.ko
-# start fetching an IP address.
-[root@nixos:]# initctl start dhclient
-
- -At the end, you end up with a working interface and the following result: - -
[root@nixos:]# lspci -v | sed -n '/Ethernet/ { :loop p; n; s/^$//; T loop; q}'
-07:00.0 Ethernet controller: Attansic Technology Corp. Device 1063 (rev c0)
-        ...
-        Kernel driver in use: atheros_eth
-        Kernel modules: atl1c
-
- -Many reference to AR81Family-linux-v1.0.1.0.tar.gz can be found on the web, but the manufacturer links are broken. - -Sources: -* [http://platonic.techfiz.info/2009/10/25/ethernet-controller-attansic-technology-corp-device-1063-on-ubuntu/ http://platonic.techfiz.info/2009/10/25/ethernet-controller-attansic-technology-corp-device-1063-on-ubuntu/] - -== Grub == - -* Changing the boot sequence in the BIOS is changing the apparent mapping of hard-drives. Thus hd0 and hd1 are inverted in GRUB 2. -* The MBR is not restored by the recovery CDs. - -[[Category:Installation]] -[[Category:Hardware]] -[[Category:Laptops]] diff --git a/asus/m60j-jx041v/README.wiki b/asus/m60j-jx041v/README.wiki new file mode 100644 index 0000000..51a0cd1 --- /dev/null +++ b/asus/m60j-jx041v/README.wiki @@ -0,0 +1,98 @@ +This page is a work in progress. + += Overview = + +Most of the features seem to be working with Linux 2.6.32. + +== Hardware == + +* Ethernet: Attansic Technology Corp. Device 1063 (rev c0) +* Wireless: Intel Corporation Wifi Link 100 Series +* Bluetooth: +* Sound: Realtek ALC269 +* Video: nVidia GeForce GT 240M +* Video RAM: 1GB DDR3 +* CPU: Core i7 720 QM (4 core, 2 threads per core) +* RAM: 4 GB +* HDD: 2* 320 GB, 5200 rpm. +* Fingerprint Sensor. + +== Support == + +* Ethernet: Yes. +* Wireless: Yes. +* Bluetooth: Yes. +* Sound: Yes. +* Video: Yes. (dual screen working fine) +* Software Raid: Yes. +* Keyboard: some Function (Fn) keys are not recognized / mapped correctly. +* Fingerprint Sensor: Not tested. (listed by lshal) + +== Tests == + +* Video: +** Maximal Resolution: 1366x768 +** glxgears: 1859.8 FPS @ 1366x768 + += Configuration = + +You can see the configuration file specific to this computer at [https://svn.nixos.org/repos/nix/configurations/trunk/computer/asus/m60j/jx041v.nix configurations/computer/asus/m60j/jx041v.nix] + += Problems & Solutions = + +== No Ethernet == + +This problem appear if you are using an old kernel. + +
[root@nixos:]# lspci -v | sed -n '/Ethernet/ { :loop p; n; s/^$//; T loop; q}'
+07:00.0 Ethernet controller: Attansic Technology Corp. Device 1063 (rev c0)
+        ...
+        Kernel driver in use: atl1c
+        Kernel modules: atl1c
+
+ +While searching on the web you find that this ethernet device need the kernel module atl1e instead of atl1c. The following sources explain how to unpack & compile & install such module on usual distributions. As we are on a NixOS, things are a bit different. + +To follow the instruction you need to find a way to copy the module sources of AR81Family-linux-v1.0.0.10.tar.gz ([http://www.backtrack.it/~emgent/hackstuff/Attansic/ http://www.backtrack.it/~emgent/hackstuff/Attansic/]) on the targeted device. + +
+# avoid messing up your term
+[root@nixos:]# initctl stop dhclient
+# add dependencies in the environment
+[root@nixos:]# nix-env -i gcc gnumake
+[root@nixos:]# ln -s /nix/store/*-linux-$(uname -r)/lib /lib
+# unpack & compile
+[root@nixos:]# mkdir /tmp/AR81Family-linux
+[root@nixos:]# cp .../AR81Family-linux-v1.0.0.10.tar.gz .
+[root@nixos:]# yes y | tar xzf AR81Family-linux-v1.0.0.10.tar.gz
+[root@nixos:]# cd src
+[root@nixos:]# make
+# Replace the current module
+[root@nixos:]# rmmod atl1c
+[root@nixos:]# modprobe /tmp/AR81Family-linux/src/atl1e.ko
+# start fetching an IP address.
+[root@nixos:]# initctl start dhclient
+
+ +At the end, you end up with a working interface and the following result: + +
[root@nixos:]# lspci -v | sed -n '/Ethernet/ { :loop p; n; s/^$//; T loop; q}'
+07:00.0 Ethernet controller: Attansic Technology Corp. Device 1063 (rev c0)
+        ...
+        Kernel driver in use: atheros_eth
+        Kernel modules: atl1c
+
+ +Many reference to AR81Family-linux-v1.0.1.0.tar.gz can be found on the web, but the manufacturer links are broken. + +Sources: +* [http://platonic.techfiz.info/2009/10/25/ethernet-controller-attansic-technology-corp-device-1063-on-ubuntu/ http://platonic.techfiz.info/2009/10/25/ethernet-controller-attansic-technology-corp-device-1063-on-ubuntu/] + +== Grub == + +* Changing the boot sequence in the BIOS is changing the apparent mapping of hard-drives. Thus hd0 and hd1 are inverted in GRUB 2. +* The MBR is not restored by the recovery CDs. + +[[Category:Installation]] +[[Category:Hardware]] +[[Category:Laptops]] diff --git a/asus/wireless-ac1300.nix b/asus/wireless-ac1300.nix index c60632a..a3122a7 100644 --- a/asus/wireless-ac1300.nix +++ b/asus/wireless-ac1300.nix @@ -1,5 +1,7 @@ # Use this module if you use a realtek 18812au based wifi dongle, like ASUS Wireless-AC1300 + { pkgs, ... }: + { boot.extraModulePackages = [ pkgs.linuxPackages.rtl8812au ]; boot.kernelModules = [ "8812au" ]; diff --git a/dell/xps-15-9550.nix b/dell/xps-15-9550.nix deleted file mode 100644 index 04f7174..0000000 --- a/dell/xps-15-9550.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = - [ ../lib/kernel-version.nix - ]; - - # Use the systemd-boot efi boot loader. (From default generated configuration.nix) - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Honestly forget if needed or just better for touchpad. - # Synaptics also works, but doesn't have working palm and thumb detection. - services.xserver.libinput.enable = true; - - # Intel Graphics confirmed not working at 4.1, confirmed working at {4.3, 4.4} - kernelAtleast = - [ { version = "4.2"; msg = "Intel Graphics confirmed not to work."; } - { version = "4.3"; msg = "Intel Graphics untested."; } - { version = "4.4"; msg = "Touchpad does not work, though the touchscreen still does"; } - ]; - - # To just use intel integrated graphics with Intel's open source driver - # hardware.nvidiaOptimus.disable = true; -} diff --git a/dell/xps-15-9550.wiki b/dell/xps-15-9550.wiki deleted file mode 100644 index d673955..0000000 --- a/dell/xps-15-9550.wiki +++ /dev/null @@ -1,38 +0,0 @@ -= Dell XPS 15 9550 = - -Most of this I presume also applies to the XPS 13 1530, the 13" variant. - -== Tested Hardware == - -* CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz -* RAM: 16 GB -* HDD: 512 GiB SSD -* Screen: 15" 4k (3840✕2160) -* Graphics: NVIDIA Corporation GM107M, with Intel Graphics too. -* Input: Touchscreen and trackpad. - - -== Firmware Configuration == - -Not much tweaking of NixOS itself was needed. But we currently cannot automate the firmware setup, so this must be done by hand. - -=== Before installation === - -These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first. - -* ''Disable Secure Boot (but keep UEFI Boot).'' Thakfully doing so is as easy as changing any other simple setting. - -* ''Disable Intel hardware RAID and use AHCI instead.'' Intel doesn't seem to provide a working linux driver for this. (If you just have SSD it's pointless and just slows things down needlessly anyways.) - - -=== After installation === - -* ''Add systemd-boot to UEFI boot list.'' The (uneditable anyways) settings mapping drive UUIDs to HD* work fine. - -=== Optional === - -* ''Disable C-States.'' This is a processor idling thing. It seems to cause random crashes (Blank screen, no normal panic debug dump). Unfortunately, without it, the computer cannot be suspended. On the other hand, it doesn't seem to affect acpi's estimation of battery life when the computer is running with minimal load, but I haven't tested battery life in practice. I list it as optional as there's a tradeoff, and the crashes are rare enough one can probably get through installation just fine. - -* ''Update BIOS.'' According to Reddit, this helps with battery life. - -* ''Update Intel's Thunderbolt firmware.'' Without this, the Thunderbolt port will only work as power source, and not transfer data. diff --git a/dell/xps/15-9550/README.wiki b/dell/xps/15-9550/README.wiki new file mode 100644 index 0000000..d673955 --- /dev/null +++ b/dell/xps/15-9550/README.wiki @@ -0,0 +1,38 @@ += Dell XPS 15 9550 = + +Most of this I presume also applies to the XPS 13 1530, the 13" variant. + +== Tested Hardware == + +* CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz +* RAM: 16 GB +* HDD: 512 GiB SSD +* Screen: 15" 4k (3840✕2160) +* Graphics: NVIDIA Corporation GM107M, with Intel Graphics too. +* Input: Touchscreen and trackpad. + + +== Firmware Configuration == + +Not much tweaking of NixOS itself was needed. But we currently cannot automate the firmware setup, so this must be done by hand. + +=== Before installation === + +These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first. + +* ''Disable Secure Boot (but keep UEFI Boot).'' Thakfully doing so is as easy as changing any other simple setting. + +* ''Disable Intel hardware RAID and use AHCI instead.'' Intel doesn't seem to provide a working linux driver for this. (If you just have SSD it's pointless and just slows things down needlessly anyways.) + + +=== After installation === + +* ''Add systemd-boot to UEFI boot list.'' The (uneditable anyways) settings mapping drive UUIDs to HD* work fine. + +=== Optional === + +* ''Disable C-States.'' This is a processor idling thing. It seems to cause random crashes (Blank screen, no normal panic debug dump). Unfortunately, without it, the computer cannot be suspended. On the other hand, it doesn't seem to affect acpi's estimation of battery life when the computer is running with minimal load, but I haven't tested battery life in practice. I list it as optional as there's a tradeoff, and the crashes are rare enough one can probably get through installation just fine. + +* ''Update BIOS.'' According to Reddit, this helps with battery life. + +* ''Update Intel's Thunderbolt firmware.'' Without this, the Thunderbolt port will only work as power source, and not transfer data. diff --git a/dell/xps/15-9550/default.nix b/dell/xps/15-9550/default.nix new file mode 100644 index 0000000..04f7174 --- /dev/null +++ b/dell/xps/15-9550/default.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ + imports = + [ ../lib/kernel-version.nix + ]; + + # Use the systemd-boot efi boot loader. (From default generated configuration.nix) + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Honestly forget if needed or just better for touchpad. + # Synaptics also works, but doesn't have working palm and thumb detection. + services.xserver.libinput.enable = true; + + # Intel Graphics confirmed not working at 4.1, confirmed working at {4.3, 4.4} + kernelAtleast = + [ { version = "4.2"; msg = "Intel Graphics confirmed not to work."; } + { version = "4.3"; msg = "Intel Graphics untested."; } + { version = "4.4"; msg = "Touchpad does not work, though the touchscreen still does"; } + ]; + + # To just use intel integrated graphics with Intel's open source driver + # hardware.nvidiaOptimus.disable = true; +} diff --git a/inversepath/usbarmory/configuration.nix b/inversepath/usbarmory/configuration.nix deleted file mode 100644 index 77efd5e..0000000 --- a/inversepath/usbarmory/configuration.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ pkgs, config, lib, ... }: -{ - nix.binaryCaches = lib.mkForce [ "http://nixos-arm.dezgeg.me/channel" ]; - nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ]; - nixpkgs.config.packageOverrides = pkgs: rec { - linuxPackages_usbarmory = pkgs.recurseIntoAttrs ( - pkgs.linuxPackagesFor ( - pkgs.buildLinux rec { - version = "4.4.0"; - src = pkgs.fetchurl { - url = "mirror://kernel/linux/kernel/v4.x/linux-4.4.tar.xz"; - sha256 = "401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2"; - }; - configfile = /etc/nixos/customKernel.config; - kernelPatches = [ - { patch = /etc/nixos/usbarmory_dts.patch; - name = "usbarmory_dts"; } - ]; - allowImportFromDerivation = true; - } - ) linuxPackages_usbarmory); - }; - boot = { - initrd.kernelModules = []; - kernelParams = [ "console=ttymxc0,115200" ]; - kernelModules = [ "ledtrig_heartbeat" "ci_hdrc_imx" "g_ether" ]; - extraModprobeConfig = "options g_ether use_eem=0 dev_addr=1a:55:89:a2:69:41 host_addr=1a:55:89:a2:69:42"; - kernelPackages = pkgs.linuxPackages_usbarmory; - - loader = { - grub.enable = false; - generic-extlinux-compatible = { - enable = true; - }; - }; - }; - networking = { - interfaces.usb0.ip4 = [ { address = "172.16.0.2"; prefixLength = 24;} ]; - hostName = "usbarmory"; - defaultGateway = "172.16.0.1"; - nameservers = [ "8.8.8.8" ]; - firewall.enable = false; -}; - sound.enable = false; - services = { - nixosManual.enable = false; - openssh.enable = true; - openssh.permitRootLogin = "without-password"; - }; - fileSystems = { - "/boot" = { - device = "/dev/disk/by-label/NIXOS_BOOT"; - fsType = "vfat"; - }; - "/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - }; - }; - -} diff --git a/inversepath/usbarmory/default.nix b/inversepath/usbarmory/default.nix new file mode 100644 index 0000000..77efd5e --- /dev/null +++ b/inversepath/usbarmory/default.nix @@ -0,0 +1,61 @@ +{ pkgs, config, lib, ... }: +{ + nix.binaryCaches = lib.mkForce [ "http://nixos-arm.dezgeg.me/channel" ]; + nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ]; + nixpkgs.config.packageOverrides = pkgs: rec { + linuxPackages_usbarmory = pkgs.recurseIntoAttrs ( + pkgs.linuxPackagesFor ( + pkgs.buildLinux rec { + version = "4.4.0"; + src = pkgs.fetchurl { + url = "mirror://kernel/linux/kernel/v4.x/linux-4.4.tar.xz"; + sha256 = "401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2"; + }; + configfile = /etc/nixos/customKernel.config; + kernelPatches = [ + { patch = /etc/nixos/usbarmory_dts.patch; + name = "usbarmory_dts"; } + ]; + allowImportFromDerivation = true; + } + ) linuxPackages_usbarmory); + }; + boot = { + initrd.kernelModules = []; + kernelParams = [ "console=ttymxc0,115200" ]; + kernelModules = [ "ledtrig_heartbeat" "ci_hdrc_imx" "g_ether" ]; + extraModprobeConfig = "options g_ether use_eem=0 dev_addr=1a:55:89:a2:69:41 host_addr=1a:55:89:a2:69:42"; + kernelPackages = pkgs.linuxPackages_usbarmory; + + loader = { + grub.enable = false; + generic-extlinux-compatible = { + enable = true; + }; + }; + }; + networking = { + interfaces.usb0.ip4 = [ { address = "172.16.0.2"; prefixLength = 24;} ]; + hostName = "usbarmory"; + defaultGateway = "172.16.0.1"; + nameservers = [ "8.8.8.8" ]; + firewall.enable = false; +}; + sound.enable = false; + services = { + nixosManual.enable = false; + openssh.enable = true; + openssh.permitRootLogin = "without-password"; + }; + fileSystems = { + "/boot" = { + device = "/dev/disk/by-label/NIXOS_BOOT"; + fsType = "vfat"; + }; + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + }; + }; + +} diff --git a/lenovo/ideapad/z510.nix b/lenovo/ideapad/z510.nix deleted file mode 100644 index 6cc6dc6..0000000 --- a/lenovo/ideapad/z510.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ 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" ]; -} diff --git a/lenovo/ideapad/z510/default.nix b/lenovo/ideapad/z510/default.nix new file mode 100644 index 0000000..6cc6dc6 --- /dev/null +++ b/lenovo/ideapad/z510/default.nix @@ -0,0 +1,9 @@ +{ 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" ]; +} diff --git a/lenovo/thinkpad/common.nix b/lenovo/thinkpad/common.nix new file mode 100644 index 0000000..cb80001 --- /dev/null +++ b/lenovo/thinkpad/common.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, ... }: + +let + inherit (lib) mkDefault; +in + +{ + hardware.trackpoint.enable = mkDefault true; + services.tlp.enable = mkDefault true; + services.xserver.libinput.enable = mkDefault true; +} diff --git a/lenovo/thinkpad/general-intel.nix b/lenovo/thinkpad/general-intel.nix deleted file mode 100644 index 5b94124..0000000 --- a/lenovo/thinkpad/general-intel.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - boot.kernelModules = mkDefault [ "kvm-intel" ]; - services.xserver.videoDrivers = [ "intel" ]; -} diff --git a/lenovo/thinkpad/general.nix b/lenovo/thinkpad/general.nix deleted file mode 100644 index cb80001..0000000 --- a/lenovo/thinkpad/general.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, pkgs, ... }: - -let - inherit (lib) mkDefault; -in - -{ - hardware.trackpoint.enable = mkDefault true; - services.tlp.enable = mkDefault true; - services.xserver.libinput.enable = mkDefault true; -} diff --git a/lenovo/thinkpad/intel.nix b/lenovo/thinkpad/intel.nix new file mode 100644 index 0000000..5b94124 --- /dev/null +++ b/lenovo/thinkpad/intel.nix @@ -0,0 +1,4 @@ +{ + boot.kernelModules = mkDefault [ "kvm-intel" ]; + services.xserver.videoDrivers = [ "intel" ]; +} diff --git a/lenovo/thinkpad/t410.nix b/lenovo/thinkpad/t410.nix deleted file mode 100644 index 53c731f..0000000 --- a/lenovo/thinkpad/t410.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./general-intel.nix ]; - - boot = { - kernelParams = [ - # Kernel GPU Savings Options (NOTE i915 chipset only) - "drm.debug=0" - "drm.vblankoffdelay=1" - "i915.semaphores=1" - "i915.modeset=1" - "i915.use_mmio_flip=1" - "i915.powersave=1" - "i915.enable_ips=1" - "i915.disable_power_well=1" - "i915.enable_hangcheck=1" - "i915.enable_cmd_parser=1" - "i915.fastboot=0" - "i915.enable_ppgtt=1" - "i915.reset=0" - "i915.lvds_use_ssc=0" - "i915.enable_psr=0" - "vblank_mode=0" - "i915.i915_enable_rc6=1" - ]; - blacklistedKernelModules = [ - # Kernel GPU Savings Options (NOTE i915 chipset only) - "sierra_net" "cdc_mbim" "cdc_ncm" "btusb" - ]; - }; - - hardware.cpu.intel.updateMicrocode = true; - - systemd.services.tune-powermanagement = { - description = "Tune Powermanagement"; - serviceConfig.Type = "oneshot"; - serviceConfig.RemainAfterExit = true; - wantedBy = [ "multi-user.target" ]; - unitConfig.RequiresMountsFor = "/sys"; - script = '' - echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs' - echo '1' > '/sys/module/snd_hda_intel/parameters/power_save' - echo 'auto' > '/sys/bus/i2c/devices/i2c-0/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-1/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-2/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-3/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-4/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-5/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-6/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-7/device/power/control' - echo 'auto' > '/sys/bus/i2c/devices/i2c-8/device/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:02.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:16.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:16.3/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:19.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1b.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.3/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.4/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1e.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.3/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.6/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:03:00.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:0d:00.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:0d:00.1/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:ff:00.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:ff:00.1/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.1/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.2/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.3/power/control' - echo 'auto' > '/sys/bus/usb/devices/1-1.3/power/control' - echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy' - echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy' - echo 'min_power' > '/sys/class/scsi_host/host2/link_power_management_policy' - echo 'min_power' > '/sys/class/scsi_host/host3/link_power_management_policy' - echo 'min_power' > '/sys/class/scsi_host/host4/link_power_management_policy' - echo 'min_power' > '/sys/class/scsi_host/host5/link_power_management_policy' - /run/current-system/sw/bin/rmmod e1000e || true - ''; - # ${pkgs.ethtool}/bin/ethtool -s enp0s25 wol d || true - }; - -} diff --git a/lenovo/thinkpad/t410/default.nix b/lenovo/thinkpad/t410/default.nix new file mode 100644 index 0000000..53d5515 --- /dev/null +++ b/lenovo/thinkpad/t410/default.nix @@ -0,0 +1,91 @@ +{ config, pkgs, ... }: + +{ + imports = [ ../intel.nix ]; + + boot = { + kernelParams = [ + # Kernel GPU Savings Options (NOTE i915 chipset only) + "drm.debug=0" + "drm.vblankoffdelay=1" + "i915.semaphores=1" + "i915.modeset=1" + "i915.use_mmio_flip=1" + "i915.powersave=1" + "i915.enable_ips=1" + "i915.disable_power_well=1" + "i915.enable_hangcheck=1" + "i915.enable_cmd_parser=1" + "i915.fastboot=0" + "i915.enable_ppgtt=1" + "i915.reset=0" + "i915.lvds_use_ssc=0" + "i915.enable_psr=0" + "vblank_mode=0" + "i915.i915_enable_rc6=1" + ]; + blacklistedKernelModules = [ + # Kernel GPU Savings Options (NOTE i915 chipset only) + "sierra_net" "cdc_mbim" "cdc_ncm" "btusb" + ]; + }; + + hardware.cpu.intel.updateMicrocode = true; + + systemd.services.tune-powermanagement = { + description = "Tune Powermanagement"; + serviceConfig.Type = "oneshot"; + serviceConfig.RemainAfterExit = true; + wantedBy = [ "multi-user.target" ]; + unitConfig.RequiresMountsFor = "/sys"; + script = '' + echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs' + echo '1' > '/sys/module/snd_hda_intel/parameters/power_save' + echo 'auto' > '/sys/bus/i2c/devices/i2c-0/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-1/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-2/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-3/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-4/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-5/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-6/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-7/device/power/control' + echo 'auto' > '/sys/bus/i2c/devices/i2c-8/device/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:02.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:16.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:16.3/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:19.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1b.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.3/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.4/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1e.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.3/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.6/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:03:00.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:0d:00.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:0d:00.1/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:ff:00.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:ff:00.1/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.0/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.1/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.2/power/control' + echo 'auto' > '/sys/bus/pci/devices/0000:ff:02.3/power/control' + echo 'auto' > '/sys/bus/usb/devices/1-1.3/power/control' + echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy' + echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy' + echo 'min_power' > '/sys/class/scsi_host/host2/link_power_management_policy' + echo 'min_power' > '/sys/class/scsi_host/host3/link_power_management_policy' + echo 'min_power' > '/sys/class/scsi_host/host4/link_power_management_policy' + echo 'min_power' > '/sys/class/scsi_host/host5/link_power_management_policy' + /run/current-system/sw/bin/rmmod e1000e || true + ''; + # ${pkgs.ethtool}/bin/ethtool -s enp0s25 wol d || true + }; + +} diff --git a/lenovo/thinkpad/t440p.nix b/lenovo/thinkpad/t440p.nix deleted file mode 100644 index 4d96bbb..0000000 --- a/lenovo/thinkpad/t440p.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./general-intel.nix ]; - - boot = { - extraModprobeConfig = '' - options bbswitch use_acpi_to_detect_card_state=1 - ''; - kernelModules = [ "tpm-rng" ]; - }; -} diff --git a/lenovo/thinkpad/t440p/default.nix b/lenovo/thinkpad/t440p/default.nix new file mode 100644 index 0000000..5c8699d --- /dev/null +++ b/lenovo/thinkpad/t440p/default.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: + +{ + imports = [ ../intel.nix ]; + + boot = { + extraModprobeConfig = '' + options bbswitch use_acpi_to_detect_card_state=1 + ''; + kernelModules = [ "tpm-rng" ]; + }; +} diff --git a/lenovo/thinkpad/t460s.nix b/lenovo/thinkpad/t460s.nix deleted file mode 100644 index 4255ddd..0000000 --- a/lenovo/thinkpad/t460s.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ - ../lib/kernel-version.nix - ./general-intel.nix - ]; - - # 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 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 -} diff --git a/lenovo/thinkpad/t460s/default.nix b/lenovo/thinkpad/t460s/default.nix new file mode 100644 index 0000000..4255ddd --- /dev/null +++ b/lenovo/thinkpad/t460s/default.nix @@ -0,0 +1,29 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../lib/kernel-version.nix + ./general-intel.nix + ]; + + # 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 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 +} diff --git a/lenovo/thinkpad/x140e.nix b/lenovo/thinkpad/x140e.nix deleted file mode 100644 index efa5106..0000000 --- a/lenovo/thinkpad/x140e.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ ./general.nix ]; - - boot = { - # wireless - kernelModules = [ "kvm-amd" "wl" ]; - extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; - - # audio device - extraModprobeConfig =