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.wiki b/acer/aspire/4810t/README.wiki similarity index 100% rename from acer/4810t.wiki rename to acer/aspire/4810t/README.wiki diff --git a/acer/4810t.nix b/acer/aspire/4810t/default.nix similarity index 100% rename from acer/4810t.nix rename to acer/aspire/4810t/default.nix diff --git a/acer/c720.wiki b/acer/c720/README.wiki similarity index 100% rename from acer/c720.wiki rename to acer/c720/README.wiki diff --git a/acer/c720.nix b/acer/c720/default.nix similarity index 100% rename from acer/c720.nix rename to acer/c720/default.nix diff --git a/airis/n990.nix b/airis/n990/default.nix similarity index 100% rename from airis/n990.nix rename to airis/n990/default.nix diff --git a/apple/macbook-pro-10-1.wiki b/apple/macbook-pro/10-1/README.wiki similarity index 100% rename from apple/macbook-pro-10-1.wiki rename to apple/macbook-pro/10-1/README.wiki diff --git a/apple/macbook-pro-10-1.nix b/apple/macbook-pro/10-1/default.nix similarity index 100% rename from apple/macbook-pro-10-1.nix rename to apple/macbook-pro/10-1/default.nix diff --git a/apple/macbook-pro-12-1.nix b/apple/macbook-pro/12-1/default.nix similarity index 100% rename from apple/macbook-pro-12-1.nix rename to apple/macbook-pro/12-1/default.nix diff --git a/asus/m60j-jx041v.wiki b/asus/m60j-jx041v/README.wiki similarity index 100% rename from asus/m60j-jx041v.wiki rename to 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 similarity index 100% rename from dell/xps-15-9550.wiki rename to dell/xps/15-9550/README.wiki diff --git a/dell/xps-15-9550.nix b/dell/xps/15-9550/default.nix similarity index 100% rename from dell/xps-15-9550.nix rename to dell/xps/15-9550/default.nix diff --git a/inversepath/usbarmory/configuration.nix b/inversepath/usbarmory/default.nix similarity index 100% rename from inversepath/usbarmory/configuration.nix rename to inversepath/usbarmory/default.nix diff --git a/lenovo/ideapad/z510.nix b/lenovo/ideapad/z510/default.nix similarity index 100% rename from lenovo/ideapad/z510.nix rename to lenovo/ideapad/z510/default.nix diff --git a/lenovo/thinkpad/general.nix b/lenovo/thinkpad/common.nix similarity index 100% rename from lenovo/thinkpad/general.nix rename to lenovo/thinkpad/common.nix diff --git a/lenovo/thinkpad/general-intel.nix b/lenovo/thinkpad/intel.nix similarity index 100% rename from lenovo/thinkpad/general-intel.nix rename to lenovo/thinkpad/intel.nix diff --git a/lenovo/thinkpad/t410.nix b/lenovo/thinkpad/t410/default.nix similarity index 99% rename from lenovo/thinkpad/t410.nix rename to 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 similarity index 82% rename from lenovo/thinkpad/t440p.nix rename to 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 similarity index 100% rename from lenovo/thinkpad/t460s.nix rename to lenovo/thinkpad/t460s/default.nix diff --git a/lenovo/thinkpad/x140e.nix b/lenovo/thinkpad/x140e/default.nix similarity index 91% rename from lenovo/thinkpad/x140e.nix rename to 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 similarity index 93% rename from lenovo/thinkpad/x220i-tablet.nix rename to 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 similarity index 100% rename from microsoft/hyper-v-guest.md rename to microsoft/hyper-v/README.md diff --git a/microsoft/surface_pro_3.wiki b/microsoft/surface-pro/3/README.wiki similarity index 100% rename from microsoft/surface_pro_3.wiki rename to microsoft/surface-pro/3/README.wiki diff --git a/microsoft/surface_pro_3.nix b/microsoft/surface-pro/3/default.nix similarity index 100% rename from microsoft/surface_pro_3.nix rename to microsoft/surface-pro/3/default.nix diff --git a/raspberry_pi/rpi2.nix b/raspberry-pi/2/default.nix similarity index 100% rename from raspberry_pi/rpi2.nix rename to raspberry-pi/2/default.nix diff --git a/samsung/np900x3c.wiki b/samsung/np900x3c/README.wiki similarity index 100% rename from samsung/np900x3c.wiki rename to samsung/np900x3c/README.wiki diff --git a/samsung/np900x3c.nix b/samsung/np900x3c/default.nix similarity index 100% rename from samsung/np900x3c.nix rename to samsung/np900x3c/default.nix diff --git a/supermicro/a1sri-2758f.nix b/supermicro/a1sri-2758f/default.nix similarity index 100% rename from supermicro/a1sri-2758f.nix rename to supermicro/a1sri-2758f/default.nix diff --git a/supermicro/x10sll-f.nix b/supermicro/x10sll-f/default.nix similarity index 100% rename from supermicro/x10sll-f.nix rename to supermicro/x10sll-f/default.nix