Skip to content

Commit 3c9f432

Browse files
lukateraszimbatm
authored andcommitted
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.
1 parent 3f2fbac commit 3c9f432

File tree

31 files changed

+53
-28
lines changed

31 files changed

+53
-28
lines changed

README.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

README.org

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
NixOS profiles covering hardware quirks.
2+
3+
Add a new channel:
4+
5+
: $ sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
6+
: $ sudo nix-channel --update nixos-hardware
7+
8+
Then add an appropriate profile path to ~imports~ in
9+
~/etc/nixos/configuration.nix~. Currently available profiles:
10+
11+
| Model | Path |
12+
|---------------------------+--------------------------------------------|
13+
| Acer Aspire 4810T | ~<nixos-hardware/acer/aspire/4810t>~ |
14+
| Acer C720 | ~<nixos-hardware/acer/c720>~ |
15+
| Airis N990 | ~<nixos-hardware/airis/n990>~ |
16+
| Apple MacBook Pro 10,1 | ~<nixos-hardware/apple/macbook-pro/10-1>~ |
17+
| Apple MacBook Pro 12,1 | ~<nixos-hardware/apple/macbook-pro/12-1>~ |
18+
| Dell XPS 15 9550 | ~<nixos-hardware/dell/xps/15-9550>~ |
19+
| Inverse Path USB armory | ~<nixos-hardware/inversepath/usbarmory>~ |
20+
| Lenovo IdeaPad Z510 | ~<nixos-hardware/lenovo/ideapad/z510>~ |
21+
| Lenovo ThinkPad T410 | ~<nixos-hardware/lenovo/thinkpad/t410>~ |
22+
| Lenovo ThinkPad T440p | ~<nixos-hardware/lenovo/thinkpad/t440p>~ |
23+
| Lenovo ThinkPad T460s | ~<nixos-hardware/lenovo/thinkpad/t460s>~ |
24+
| Lenovo ThinkPad X140e | ~<nixos-hardware/lenovo/thinkpad/x140e>~ |
25+
| Lenovo ThinkPad X220 | ~<nixos-hardware/lenovo/thinkpad/x220>~ |
26+
| Microsoft Surface Pro 3 | ~<nixos-hardware/microsoft/surface-pro/3>~ |
27+
| Raspberry Pi 2 | ~<nixos-hardware/raspberry-pi/2>~ |
28+
| Samsung Series 9 NP900X3C | ~<nixos-hardware/samsung/np900x3c>~ |
29+
| Supermicro A1SRi-2758F | ~<nixos-hardware/supermicro/a1sri-2758f>~ |
30+
| Supermicro X10SLL-F | ~<nixos-hardware/supermicro/x10sll-f>~ |
31+
32+
For example, to enable ThinkPad X220 profile, your ~imports~ should look like:
33+
34+
: imports = [ <nixos-hardware/lenovo/thinkpad/x220> ./hardware-configuration.nix ];
35+
36+
Profiles should favor usability and stability, so performance hacks should be
37+
activated by an additional NixOS option or conservative and performance configs
38+
can be declared in seperate profiles.
39+
40+
Because profiles can only be tested with the appropriate hardware, quality
41+
assurance is up to *you*.
42+
43+
** Simple tips and tricks
44+
45+
*** Disable PC speaker
46+
47+
: boot.blacklistedKernelModules = [ "pcspkr" ];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

asus/wireless-ac1300.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Use this module if you use a realtek 18812au based wifi dongle, like ASUS Wireless-AC1300
2+
23
{ pkgs, ... }:
4+
35
{
46
boot.extraModulePackages = [ pkgs.linuxPackages.rtl8812au ];
57
boot.kernelModules = [ "8812au" ];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lenovo/thinkpad/t410.nix renamed to lenovo/thinkpad/t410/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ config, pkgs, ... }:
22

33
{
4-
imports = [ ./general-intel.nix ];
4+
imports = [ ../intel.nix ];
55

66
boot = {
77
kernelParams = [

lenovo/thinkpad/t440p.nix renamed to lenovo/thinkpad/t440p/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ config, pkgs, ... }:
22

33
{
4-
imports = [ ./general-intel.nix ];
4+
imports = [ ../intel.nix ];
55

66
boot = {
77
extraModprobeConfig = ''
File renamed without changes.

lenovo/thinkpad/x140e.nix renamed to lenovo/thinkpad/x140e/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ config, lib, pkgs, ... }:
22

33
{
4-
imports = [ ./general.nix ];
4+
imports = [ ../common.nix ];
55

66
boot = {
77
# wireless

lenovo/thinkpad/x220i-tablet.nix renamed to lenovo/thinkpad/x220/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ config, pkgs, ... }:
22

33
{
4-
imports = [ ./general-intel.nix ];
4+
imports = [ ../intel.nix ];
55

66
# TPM chip countains a RNG
77
security.rngd.enable = true;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)