diff options
author | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-22 20:17:00 +0300 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2017-12-22 17:17:00 +0000 |
commit | 3c9f432a7146115b2d0b6200c4c19101c29caaba (patch) | |
tree | 0e0a9c6ab58f8eda82624a5b7f7238fefb6244ed | |
parent | 3f2fbacb216c8905f8ca15d2c24fe95472fb9ab2 (diff) |
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.
-rw-r--r-- | README.md | 24 | ||||
-rw-r--r-- | README.org | 47 | ||||
-rw-r--r-- | acer/aspire/4810t/README.wiki (renamed from acer/4810t.wiki) | 0 | ||||
-rw-r--r-- | acer/aspire/4810t/default.nix (renamed from acer/4810t.nix) | 0 | ||||
-rw-r--r-- | acer/c720/README.wiki (renamed from acer/c720.wiki) | 0 | ||||
-rw-r--r-- | acer/c720/default.nix (renamed from acer/c720.nix) | 0 | ||||
-rw-r--r-- | airis/n990/default.nix (renamed from airis/n990.nix) | 0 | ||||
-rw-r--r-- | apple/macbook-pro/10-1/README.wiki (renamed from apple/macbook-pro-10-1.wiki) | 0 | ||||
-rw-r--r-- | apple/macbook-pro/10-1/default.nix (renamed from apple/macbook-pro-10-1.nix) | 0 | ||||
-rw-r--r-- | apple/macbook-pro/12-1/default.nix (renamed from apple/macbook-pro-12-1.nix) | 0 | ||||
-rw-r--r-- | asus/m60j-jx041v/README.wiki (renamed from asus/m60j-jx041v.wiki) | 0 | ||||
-rw-r--r-- | asus/wireless-ac1300.nix | 2 | ||||
-rw-r--r-- | dell/xps/15-9550/README.wiki (renamed from dell/xps-15-9550.wiki) | 0 | ||||
-rw-r--r-- | dell/xps/15-9550/default.nix (renamed from dell/xps-15-9550.nix) | 0 | ||||
-rw-r--r-- | inversepath/usbarmory/default.nix (renamed from inversepath/usbarmory/configuration.nix) | 0 | ||||
-rw-r--r-- | lenovo/ideapad/z510/default.nix (renamed from lenovo/ideapad/z510.nix) | 0 | ||||
-rw-r--r-- | lenovo/thinkpad/common.nix (renamed from lenovo/thinkpad/general.nix) | 0 | ||||
-rw-r--r-- | lenovo/thinkpad/intel.nix (renamed from lenovo/thinkpad/general-intel.nix) | 0 | ||||
-rw-r--r-- | lenovo/thinkpad/t410/default.nix (renamed from lenovo/thinkpad/t410.nix) | 2 | ||||
-rw-r--r-- | lenovo/thinkpad/t440p/default.nix (renamed from lenovo/thinkpad/t440p.nix) | 2 | ||||
-rw-r--r-- | lenovo/thinkpad/t460s/default.nix (renamed from lenovo/thinkpad/t460s.nix) | 0 | ||||
-rw-r--r-- | lenovo/thinkpad/x140e/default.nix (renamed from lenovo/thinkpad/x140e.nix) | 2 | ||||
-rw-r--r-- | lenovo/thinkpad/x220/default.nix (renamed from lenovo/thinkpad/x220i-tablet.nix) | 2 | ||||
-rw-r--r-- | microsoft/hyper-v/README.md (renamed from microsoft/hyper-v-guest.md) | 0 | ||||
-rw-r--r-- | microsoft/surface-pro/3/README.wiki (renamed from microsoft/surface_pro_3.wiki) | 0 | ||||
-rw-r--r-- | microsoft/surface-pro/3/default.nix (renamed from microsoft/surface_pro_3.nix) | 0 | ||||
-rw-r--r-- | raspberry-pi/2/default.nix (renamed from raspberry_pi/rpi2.nix) | 0 | ||||
-rw-r--r-- | samsung/np900x3c/README.wiki (renamed from samsung/np900x3c.wiki) | 0 | ||||
-rw-r--r-- | samsung/np900x3c/default.nix (renamed from samsung/np900x3c.nix) | 0 | ||||
-rw-r--r-- | supermicro/a1sri-2758f/default.nix (renamed from supermicro/a1sri-2758f.nix) | 0 | ||||
-rw-r--r-- | supermicro/x10sll-f/default.nix (renamed from supermicro/x10sll-f.nix) | 0 |
31 files changed, 53 insertions, 28 deletions
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 | ~<nixos-hardware/acer/aspire/4810t>~ | +| Acer C720 | ~<nixos-hardware/acer/c720>~ | +| Airis N990 | ~<nixos-hardware/airis/n990>~ | +| Apple MacBook Pro 10,1 | ~<nixos-hardware/apple/macbook-pro/10-1>~ | +| Apple MacBook Pro 12,1 | ~<nixos-hardware/apple/macbook-pro/12-1>~ | +| Dell XPS 15 9550 | ~<nixos-hardware/dell/xps/15-9550>~ | +| Inverse Path USB armory | ~<nixos-hardware/inversepath/usbarmory>~ | +| Lenovo IdeaPad Z510 | ~<nixos-hardware/lenovo/ideapad/z510>~ | +| Lenovo ThinkPad T410 | ~<nixos-hardware/lenovo/thinkpad/t410>~ | +| Lenovo ThinkPad T440p | ~<nixos-hardware/lenovo/thinkpad/t440p>~ | +| Lenovo ThinkPad T460s | ~<nixos-hardware/lenovo/thinkpad/t460s>~ | +| Lenovo ThinkPad X140e | ~<nixos-hardware/lenovo/thinkpad/x140e>~ | +| Lenovo ThinkPad X220 | ~<nixos-hardware/lenovo/thinkpad/x220>~ | +| Microsoft Surface Pro 3 | ~<nixos-hardware/microsoft/surface-pro/3>~ | +| Raspberry Pi 2 | ~<nixos-hardware/raspberry-pi/2>~ | +| Samsung Series 9 NP900X3C | ~<nixos-hardware/samsung/np900x3c>~ | +| Supermicro A1SRi-2758F | ~<nixos-hardware/supermicro/a1sri-2758f>~ | +| Supermicro X10SLL-F | ~<nixos-hardware/supermicro/x10sll-f>~ | + +For example, to enable ThinkPad X220 profile, your ~imports~ should look like: + + : imports = [ <nixos-hardware/lenovo/thinkpad/x220> ./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.wiki b/acer/aspire/4810t/README.wiki index 0b045b6..0b045b6 100644 --- a/acer/4810t.wiki +++ b/acer/aspire/4810t/README.wiki diff --git a/acer/4810t.nix b/acer/aspire/4810t/default.nix index ce1091b..ce1091b 100644 --- a/acer/4810t.nix +++ b/acer/aspire/4810t/default.nix diff --git a/acer/c720.wiki b/acer/c720/README.wiki index 5200ab6..5200ab6 100644 --- a/acer/c720.wiki +++ b/acer/c720/README.wiki diff --git a/acer/c720.nix b/acer/c720/default.nix index 4836089..4836089 100644 --- a/acer/c720.nix +++ b/acer/c720/default.nix diff --git a/airis/n990.nix b/airis/n990/default.nix index b3056b7..b3056b7 100644 --- a/airis/n990.nix +++ b/airis/n990/default.nix diff --git a/apple/macbook-pro-10-1.wiki b/apple/macbook-pro/10-1/README.wiki index 149b30e..149b30e 100644 --- a/apple/macbook-pro-10-1.wiki +++ b/apple/macbook-pro/10-1/README.wiki diff --git a/apple/macbook-pro-10-1.nix b/apple/macbook-pro/10-1/default.nix index 797404e..797404e 100644 --- a/apple/macbook-pro-10-1.nix +++ b/apple/macbook-pro/10-1/default.nix diff --git a/apple/macbook-pro-12-1.nix b/apple/macbook-pro/12-1/default.nix index c755ce0..c755ce0 100644 --- a/apple/macbook-pro-12-1.nix +++ b/apple/macbook-pro/12-1/default.nix diff --git a/asus/m60j-jx041v.wiki b/asus/m60j-jx041v/README.wiki index 51a0cd1..51a0cd1 100644 --- a/asus/m60j-jx041v.wiki +++ b/asus/m60j-jx041v/README.wiki 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.wiki b/dell/xps/15-9550/README.wiki index d673955..d673955 100644 --- a/dell/xps-15-9550.wiki +++ b/dell/xps/15-9550/README.wiki diff --git a/dell/xps-15-9550.nix b/dell/xps/15-9550/default.nix index 04f7174..04f7174 100644 --- a/dell/xps-15-9550.nix +++ b/dell/xps/15-9550/default.nix diff --git a/inversepath/usbarmory/configuration.nix b/inversepath/usbarmory/default.nix index 77efd5e..77efd5e 100644 --- a/inversepath/usbarmory/configuration.nix +++ b/inversepath/usbarmory/default.nix diff --git a/lenovo/ideapad/z510.nix b/lenovo/ideapad/z510/default.nix index 6cc6dc6..6cc6dc6 100644 --- a/lenovo/ideapad/z510.nix +++ b/lenovo/ideapad/z510/default.nix diff --git a/lenovo/thinkpad/general.nix b/lenovo/thinkpad/common.nix index cb80001..cb80001 100644 --- a/lenovo/thinkpad/general.nix +++ b/lenovo/thinkpad/common.nix diff --git a/lenovo/thinkpad/general-intel.nix b/lenovo/thinkpad/intel.nix index 5b94124..5b94124 100644 --- a/lenovo/thinkpad/general-intel.nix +++ b/lenovo/thinkpad/intel.nix diff --git a/lenovo/thinkpad/t410.nix b/lenovo/thinkpad/t410/default.nix index 53c731f..53d5515 100644 --- a/lenovo/thinkpad/t410.nix +++ b/lenovo/thinkpad/t410/default.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - imports = [ ./general-intel.nix ]; + imports = [ ../intel.nix ]; boot = { kernelParams = [ diff --git a/lenovo/thinkpad/t440p.nix b/lenovo/thinkpad/t440p/default.nix index 4d96bbb..5c8699d 100644 --- a/lenovo/thinkpad/t440p.nix +++ b/lenovo/thinkpad/t440p/default.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - imports = [ ./general-intel.nix ]; + imports = [ ../intel.nix ]; boot = { extraModprobeConfig = '' diff --git a/lenovo/thinkpad/t460s.nix b/lenovo/thinkpad/t460s/default.nix index 4255ddd..4255ddd 100644 --- a/lenovo/thinkpad/t460s.nix +++ b/lenovo/thinkpad/t460s/default.nix diff --git a/lenovo/thinkpad/x140e.nix b/lenovo/thinkpad/x140e/default.nix index efa5106..a6fb02a 100644 --- a/lenovo/thinkpad/x140e.nix +++ b/lenovo/thinkpad/x140e/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: { - imports = [ ./general.nix ]; + imports = [ ../common.nix ]; boot = { # wireless diff --git a/lenovo/thinkpad/x220i-tablet.nix b/lenovo/thinkpad/x220/default.nix index 9f9638a..3a9e99b 100644 --- a/lenovo/thinkpad/x220i-tablet.nix +++ b/lenovo/thinkpad/x220/default.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - imports = [ ./general-intel.nix ]; + imports = [ ../intel.nix ]; # TPM chip countains a RNG security.rngd.enable = true; diff --git a/microsoft/hyper-v-guest.md b/microsoft/hyper-v/README.md index f396214..f396214 100644 --- a/microsoft/hyper-v-guest.md +++ b/microsoft/hyper-v/README.md diff --git a/microsoft/surface_pro_3.wiki b/microsoft/surface-pro/3/README.wiki index 9ffdc55..9ffdc55 100644 --- a/microsoft/surface_pro_3.wiki +++ b/microsoft/surface-pro/3/README.wiki diff --git a/microsoft/surface_pro_3.nix b/microsoft/surface-pro/3/default.nix index 48528f9..48528f9 100644 --- a/microsoft/surface_pro_3.nix +++ b/microsoft/surface-pro/3/default.nix diff --git a/raspberry_pi/rpi2.nix b/raspberry-pi/2/default.nix index 897871e..897871e 100644 --- a/raspberry_pi/rpi2.nix +++ b/raspberry-pi/2/default.nix diff --git a/samsung/np900x3c.wiki b/samsung/np900x3c/README.wiki index e9fc58b..e9fc58b 100644 --- a/samsung/np900x3c.wiki +++ b/samsung/np900x3c/README.wiki diff --git a/samsung/np900x3c.nix b/samsung/np900x3c/default.nix index 73d16bd..73d16bd 100644 --- a/samsung/np900x3c.nix +++ b/samsung/np900x3c/default.nix diff --git a/supermicro/a1sri-2758f.nix b/supermicro/a1sri-2758f/default.nix index c16c093..c16c093 100644 --- a/supermicro/a1sri-2758f.nix +++ b/supermicro/a1sri-2758f/default.nix diff --git a/supermicro/x10sll-f.nix b/supermicro/x10sll-f/default.nix index f60e6cf..f60e6cf 100644 --- a/supermicro/x10sll-f.nix +++ b/supermicro/x10sll-f/default.nix |