├── .editorconfig ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ └── test.yml ├── .gitignore ├── .mergify.yml ├── CODEOWNERS ├── CONTRIBUTING.md ├── COPYING ├── README.md ├── acer └── aspire │ └── 4810t │ ├── README.wiki │ └── default.nix ├── airis └── n990 │ └── default.nix ├── aoostar └── r1 │ └── n100 │ └── default.nix ├── apple ├── README.md ├── default.nix ├── imac │ ├── 14-2 │ │ ├── README.md │ │ └── default.nix │ ├── 18-2 │ │ ├── README.md │ │ └── default.nix │ └── default.nix ├── macbook-air │ ├── 3 │ │ └── default.nix │ ├── 4 │ │ └── default.nix │ ├── 6 │ │ └── default.nix │ ├── 7 │ │ ├── README.md │ │ └── default.nix │ └── default.nix ├── macbook-pro │ ├── 10-1 │ │ ├── README.wiki │ │ └── default.nix │ ├── 11-1 │ │ ├── README.md │ │ └── default.nix │ ├── 11-5 │ │ ├── README.md │ │ └── default.nix │ ├── 12-1 │ │ ├── README.md │ │ └── default.nix │ ├── 14-1 │ │ ├── README.md │ │ ├── default.nix │ │ └── disable-nvme-d3cold.sh │ ├── 8-1 │ │ ├── README.md │ │ └── default.nix │ └── default.nix ├── macmini │ ├── 4 │ │ └── default.nix │ └── default.nix └── t2 │ ├── README.md │ ├── default.nix │ └── pkgs │ ├── brcm-firmware │ ├── default.nix │ ├── fetchmacos.nix │ ├── get-firmware-standalone.patch │ ├── get-firmware.nix │ └── macrecovery.nix │ └── linux-t2 │ ├── default.nix │ ├── generic.nix │ ├── latest.json │ ├── latest.nix │ ├── stable.json │ └── update-patches.py ├── asus ├── ally │ └── rc71l │ │ ├── README.md │ │ └── default.nix ├── battery.nix ├── fa506ic │ └── default.nix ├── fa507nv │ ├── README.md │ └── default.nix ├── fa507rm │ └── default.nix ├── flow │ └── gv302x │ │ ├── amdgpu │ │ └── default.nix │ │ ├── nvidia │ │ └── default.nix │ │ └── shared.nix ├── fx504gd │ └── default.nix ├── fx506hm │ ├── README.md │ └── default.nix ├── pro-ws-x570-ace │ ├── README.wiki │ └── default.nix ├── rog-strix │ ├── g513im │ │ └── default.nix │ ├── g533zw │ │ └── default.nix │ ├── g713ie │ │ └── default.nix │ ├── g733qs │ │ ├── default.nix │ │ └── hda-jack-retask.fw │ └── x570e │ │ └── default.nix ├── wireless-ac1300.nix ├── zenbook │ ├── ux371 │ │ ├── README.md │ │ └── default.nix │ ├── ux481 │ │ ├── README.md │ │ ├── intelgpu │ │ │ └── default.nix │ │ ├── nvidia │ │ │ └── default.nix │ │ └── shared.nix │ └── ux535 │ │ ├── README.md │ │ └── default.nix └── zephyrus │ ├── ga401 │ └── default.nix │ ├── ga402 │ └── default.nix │ ├── ga402x │ ├── ATTR-SET-DEPRECATION.md │ ├── amdgpu │ │ └── default.nix │ ├── default.nix │ ├── nvidia │ │ └── default.nix │ └── shared.nix │ ├── ga502 │ └── default.nix │ ├── ga503 │ └── default.nix │ ├── gu603h │ └── default.nix │ ├── gu605my │ └── default.nix │ └── shared │ └── backlight.nix ├── audio-gd └── compass2.nix ├── beagleboard └── pocketbeagle │ └── default.nix ├── chuwi └── minibook-x │ └── default.nix ├── common ├── cpu │ ├── amd │ │ ├── default.nix │ │ ├── pstate.nix │ │ ├── raphael │ │ │ └── igpu.nix │ │ └── zenpower.nix │ └── intel │ │ ├── alder-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── bay-trail │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── braswell │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── broadwell │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── coffee-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── comet-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── cpu-only.nix │ │ ├── default.nix │ │ ├── elkhart-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── haswell │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── jasper-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── kaby-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── lunar-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── meteor-lake │ │ └── default.nix │ │ ├── raptor-lake │ │ └── default.nix │ │ ├── sandy-bridge │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── skylake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ ├── tiger-lake │ │ ├── cpu-only.nix │ │ └── default.nix │ │ └── whiskey-lake │ │ ├── cpu-only.nix │ │ └── default.nix ├── gpu │ ├── 24.05-compat.nix │ ├── amd │ │ ├── default.nix │ │ ├── sea-islands │ │ │ └── default.nix │ │ └── southern-islands │ │ │ └── default.nix │ ├── intel │ │ ├── alder-lake │ │ │ └── default.nix │ │ ├── bay-trail │ │ │ └── default.nix │ │ ├── braswell │ │ │ └── default.nix │ │ ├── broadwell │ │ │ └── default.nix │ │ ├── coffee-lake │ │ │ └── default.nix │ │ ├── comet-lake │ │ │ └── default.nix │ │ ├── default.nix │ │ ├── disable.nix │ │ ├── elkhart-lake │ │ │ └── default.nix │ │ ├── haswell │ │ │ └── default.nix │ │ ├── jasper-lake │ │ │ └── default.nix │ │ ├── kaby-lake │ │ │ └── default.nix │ │ ├── lunar-lake │ │ │ └── default.nix │ │ ├── meteor-lake │ │ │ └── default.nix │ │ ├── raptor-lake │ │ │ └── default.nix │ │ ├── sandy-bridge │ │ │ └── default.nix │ │ ├── skylake │ │ │ └── default.nix │ │ ├── tiger-lake │ │ │ └── default.nix │ │ └── whiskey-lake │ │ │ └── default.nix │ └── nvidia │ │ ├── ada-lovelace │ │ └── default.nix │ │ ├── ampere │ │ └── default.nix │ │ ├── default.nix │ │ ├── disable.nix │ │ ├── fermi │ │ └── default.nix │ │ ├── kepler │ │ └── default.nix │ │ ├── maxwell │ │ └── default.nix │ │ ├── pascal │ │ └── default.nix │ │ ├── prime-sync.nix │ │ ├── prime.nix │ │ └── turing │ │ └── default.nix ├── hidpi.nix └── pc │ ├── default.nix │ ├── hdd │ └── default.nix │ ├── laptop │ ├── default.nix │ └── hdd │ │ └── default.nix │ └── ssd │ └── default.nix ├── deciso └── dec │ └── default.nix ├── default.nix ├── dell ├── e7240 │ └── default.nix ├── g3 │ ├── 3579 │ │ └── default.nix │ └── 3779 │ │ └── default.nix ├── inspiron │ ├── 3442 │ │ ├── README.md │ │ └── default.nix │ ├── 5509 │ │ ├── README.md │ │ └── default.nix │ ├── 5515 │ │ ├── README.md │ │ ├── default.nix │ │ └── fix_touchpad.sh │ ├── 7405 │ │ ├── README.md │ │ └── default.nix │ ├── 7460 │ │ ├── README.md │ │ └── default.nix │ ├── 7559 │ │ ├── README.md │ │ └── default.nix │ └── 14-5420 │ │ ├── README.md │ │ └── default.nix ├── latitude │ ├── 3340 │ │ └── default.nix │ ├── 3480 │ │ └── default.nix │ ├── 5490 │ │ ├── README.md │ │ └── default.nix │ ├── 5520 │ │ ├── README.md │ │ └── default.nix │ ├── 7280 │ │ └── default.nix │ ├── 7390 │ │ └── default.nix │ ├── 7420 │ │ └── default.nix │ ├── 7430 │ │ └── default.nix │ ├── 7490 │ │ ├── README.wiki │ │ └── default.nix │ ├── 9430 │ │ └── default.nix │ └── e7240 │ │ ├── README.md │ │ └── default.nix ├── optiplex │ └── 3050 │ │ └── default.nix ├── poweredge │ ├── README.md │ └── r7515 │ │ └── default.nix ├── precision │ ├── 3490 │ │ └── default.nix │ ├── 3541 │ │ ├── default.nix │ │ └── intel │ │ │ └── default.nix │ ├── 5490 │ │ ├── README.md │ │ └── default.nix │ ├── 5530 │ │ └── default.nix │ ├── 5560 │ │ ├── README.md │ │ └── default.nix │ └── 7520 │ │ ├── README.md │ │ └── default.nix └── xps │ ├── 13-7390 │ ├── README.wiki │ └── default.nix │ ├── 13-9300 │ ├── README.wiki │ └── default.nix │ ├── 13-9310 │ └── default.nix │ ├── 13-9315 │ ├── README.wiki │ └── default.nix │ ├── 13-9333 │ ├── README.wiki │ └── default.nix │ ├── 13-9343 │ └── default.nix │ ├── 13-9350 │ └── default.nix │ ├── 13-9360 │ └── default.nix │ ├── 13-9370 │ ├── README.wiki │ └── default.nix │ ├── 13-9380 │ ├── README.wiki │ └── default.nix │ ├── 15-7590 │ ├── README.wiki │ ├── default.nix │ └── nvidia │ │ └── default.nix │ ├── 15-9500 │ ├── README.wiki │ ├── default.nix │ ├── nvidia │ │ └── default.nix │ └── thermald-conf.xml │ ├── 15-9510 │ ├── README.wiki │ ├── default.nix │ └── nvidia │ │ └── default.nix │ ├── 15-9520 │ ├── README.wiki │ ├── default.nix │ └── nvidia │ │ └── default.nix │ ├── 15-9530 │ ├── README.wiki │ ├── default.nix │ └── nvidia │ │ └── default.nix │ ├── 15-9550 │ ├── README.wiki │ ├── default.nix │ └── nvidia │ │ └── default.nix │ ├── 15-9560 │ ├── README.wiki │ ├── default.nix │ ├── intel │ │ └── default.nix │ ├── nvidia │ │ └── default.nix │ └── xps-common.nix │ ├── 15-9570 │ ├── README.wiki │ ├── default.nix │ ├── intel │ │ └── default.nix │ ├── nvidia │ │ └── default.nix │ └── shared.nix │ ├── 17-9700 │ ├── README.wiki │ ├── common.nix │ ├── intel │ │ └── default.nix │ └── nvidia │ │ └── default.nix │ ├── 17-9710 │ ├── README.wiki │ └── intel │ │ ├── README.wiki │ │ └── default.nix │ └── sleep-resume │ ├── bluetooth │ └── default.nix │ └── i2c-designware │ └── default.nix ├── flake.nix ├── focus └── m2 │ └── gen1 │ └── default.nix ├── framework ├── 12-inch │ ├── 13th-gen-intel │ │ ├── README.md │ │ └── default.nix │ └── common │ │ └── default.nix ├── 13-inch │ ├── 11th-gen-intel │ │ ├── README.md │ │ └── default.nix │ ├── 12th-gen-intel │ │ ├── README.md │ │ └── default.nix │ ├── 13th-gen-intel │ │ ├── README.md │ │ └── default.nix │ ├── 7040-amd │ │ ├── README.md │ │ └── default.nix │ ├── amd-ai-300-series │ │ ├── README.md │ │ └── default.nix │ ├── common │ │ ├── amd.nix │ │ ├── audio.nix │ │ ├── default.nix │ │ └── intel.nix │ └── intel-core-ultra-series1 │ │ ├── README.md │ │ └── default.nix ├── 16-inch │ ├── 7040-amd │ │ ├── README.md │ │ └── default.nix │ └── common │ │ ├── amd.nix │ │ └── default.nix ├── OLD-BEHAVIOUR-DEPRECATION.md ├── README.md ├── bluetooth.nix ├── default.nix ├── framework-tool.nix └── kmod.nix ├── friendlyarm ├── nanopc-t4 │ ├── README.md │ └── default.nix └── nanopi-r5s │ └── default.nix ├── gigabyte ├── b550 │ ├── README.md │ ├── b550-fix-suspend.nix │ └── default.nix └── b650 │ ├── README.md │ ├── b650-fix-suspend.nix │ └── default.nix ├── gmktec └── nucbox │ └── g3-plus │ └── default.nix ├── google └── pixelbook │ └── default.nix ├── gpd ├── micropc │ └── default.nix ├── p2-max │ └── default.nix ├── pocket-3 │ └── default.nix ├── pocket-4 │ └── default.nix ├── win-2 │ └── default.nix ├── win-max-2 │ ├── 2023 │ │ ├── README.md │ │ ├── bmi260 │ │ │ ├── default.nix │ │ │ └── package.nix │ │ └── default.nix │ └── default.nix └── win-mini │ ├── 2024 │ ├── README.md │ └── default.nix │ └── default.nix ├── hardkernel ├── odroid-h3 │ └── default.nix ├── odroid-h4 │ └── default.nix └── odroid-hc4 │ └── default.nix ├── hp ├── elitebook │ ├── 830 │ │ └── g6 │ │ │ ├── README.md │ │ │ └── default.nix │ ├── 845 │ │ ├── g7 │ │ │ └── default.nix │ │ ├── g8 │ │ │ └── default.nix │ │ └── g9 │ │ │ └── default.nix │ └── 2560p │ │ ├── default.nix │ │ └── network.nix ├── laptop │ └── 14s-dq2024nf │ │ └── default.nix ├── notebook │ └── 14-df0023 │ │ └── default.nix └── probook │ └── 440G5 │ └── default.nix ├── huawei └── machc-wa │ ├── README.md │ └── default.nix ├── intel └── nuc │ └── 8i7beh │ ├── README.md │ └── default.nix ├── kobol └── helios4 │ ├── default.nix │ ├── modules │ ├── 90-helios4-hwmon.rules │ └── fancontrol.nix │ └── overlay.nix ├── lenovo ├── ideacentre │ └── k330 │ │ ├── README.md │ │ └── default.nix ├── ideapad │ ├── 14imh9 │ │ ├── README.md │ │ └── default.nix │ ├── 15ach6 │ │ ├── README.md │ │ └── default.nix │ ├── 15alc6 │ │ └── default.nix │ ├── 15arh05 │ │ └── default.nix │ ├── 16ach6 │ │ ├── README.md │ │ └── default.nix │ ├── 16ahp9 │ │ ├── README.md │ │ └── default.nix │ ├── 16iah8 │ │ ├── README.md │ │ └── default.nix │ ├── default.nix │ ├── s145-15api │ │ └── default.nix │ ├── slim-5 │ │ └── default.nix │ └── z510 │ │ └── default.nix ├── legion │ ├── 15ach6 │ │ └── default.nix │ ├── 15ach6h │ │ ├── README.md │ │ ├── default.nix │ │ ├── hybrid │ │ │ └── default.nix │ │ └── nvidia │ │ │ └── default.nix │ ├── 15arh05h │ │ └── default.nix │ ├── 15ich │ │ ├── README.md │ │ └── default.nix │ ├── 16ach6h │ │ ├── README.md │ │ ├── default.nix │ │ ├── edid │ │ │ ├── 16ach6h.bin │ │ │ └── default.nix │ │ ├── hybrid │ │ │ └── default.nix │ │ └── nvidia │ │ │ └── default.nix │ ├── 16achg6 │ │ ├── README.md │ │ ├── hybrid │ │ │ └── default.nix │ │ └── nvidia │ │ │ └── default.nix │ ├── 16aph8 │ │ ├── README.md │ │ └── default.nix │ ├── 16arh7h │ │ ├── README.md │ │ ├── hybrid │ │ │ └── default.nix │ │ └── igpu-only │ │ │ └── default.nix │ ├── 16arha7 │ │ ├── README.md │ │ ├── audio │ │ │ ├── lenovo-16ARHA7_speaker-fix.nix │ │ │ └── lenovo_16ARHA7_sound_fix.patch │ │ └── default.nix │ ├── 16irx8h │ │ └── default.nix │ ├── 16irx9h │ │ └── default.nix │ ├── 16ithg6 │ │ └── default.nix │ └── t526amr5 │ │ ├── README.md │ │ └── default.nix ├── thinkpad │ ├── a475 │ │ └── default.nix │ ├── default.nix │ ├── e14 │ │ ├── amd │ │ │ └── default.nix │ │ ├── default.nix │ │ └── intel │ │ │ ├── default.nix │ │ │ ├── gen4 │ │ │ └── default.nix │ │ │ └── gen6 │ │ │ └── default.nix │ ├── e15 │ │ ├── README.md │ │ ├── default.nix │ │ └── intel │ │ │ └── default.nix │ ├── e470 │ │ └── default.nix │ ├── e495 │ │ └── default.nix │ ├── l13 │ │ ├── default.nix │ │ └── yoga │ │ │ └── default.nix │ ├── l14 │ │ ├── amd │ │ │ └── default.nix │ │ ├── default.nix │ │ └── intel │ │ │ └── default.nix │ ├── l480 │ │ └── default.nix │ ├── p1 │ │ ├── 3th-gen │ │ │ ├── audio.nix │ │ │ ├── default.nix │ │ │ └── nvidia.nix │ │ └── default.nix │ ├── p14s │ │ ├── amd │ │ │ ├── default.nix │ │ │ ├── gen1 │ │ │ │ └── default.nix │ │ │ ├── gen2 │ │ │ │ └── default.nix │ │ │ ├── gen3 │ │ │ │ └── default.nix │ │ │ └── gen4 │ │ │ │ └── default.nix │ │ ├── default.nix │ │ └── intel │ │ │ ├── default.nix │ │ │ ├── gen3 │ │ │ └── default.nix │ │ │ └── gen5 │ │ │ └── default.nix │ ├── p16s │ │ ├── amd │ │ │ ├── default.nix │ │ │ ├── gen1 │ │ │ │ └── default.nix │ │ │ └── gen2 │ │ │ │ └── default.nix │ │ ├── default.nix │ │ └── intel │ │ │ ├── default.nix │ │ │ └── gen2 │ │ │ ├── README.md │ │ │ └── default.nix │ ├── p43s │ │ ├── README.md │ │ └── default.nix │ ├── p50 │ │ └── default.nix │ ├── p51 │ │ └── default.nix │ ├── p52 │ │ └── default.nix │ ├── p53 │ │ └── default.nix │ ├── t14 │ │ ├── amd │ │ │ ├── default.nix │ │ │ ├── gen1 │ │ │ │ └── default.nix │ │ │ ├── gen2 │ │ │ │ └── default.nix │ │ │ ├── gen3 │ │ │ │ └── default.nix │ │ │ ├── gen4 │ │ │ │ └── default.nix │ │ │ └── gen5 │ │ │ │ └── default.nix │ │ └── default.nix │ ├── t14s │ │ ├── amd │ │ │ ├── default.nix │ │ │ ├── gen1 │ │ │ │ └── default.nix │ │ │ └── gen4 │ │ │ │ └── default.nix │ │ └── default.nix │ ├── t410 │ │ └── default.nix │ ├── t420 │ │ └── default.nix │ ├── t430 │ │ └── default.nix │ ├── t440p │ │ └── default.nix │ ├── t440s │ │ └── default.nix │ ├── t450s │ │ └── default.nix │ ├── t460 │ │ └── default.nix │ ├── t460p │ │ └── default.nix │ ├── t460s │ │ └── default.nix │ ├── t470s │ │ └── default.nix │ ├── t480 │ │ └── default.nix │ ├── t480s │ │ └── default.nix │ ├── t490 │ │ ├── default.nix │ │ └── t490-profile-set.conf │ ├── t490s │ │ └── default.nix │ ├── t495 │ │ └── default.nix │ ├── t520 │ │ └── default.nix │ ├── t550 │ │ └── default.nix │ ├── t590 │ │ └── default.nix │ ├── tp-smapi.nix │ ├── w520 │ │ └── default.nix │ ├── x1-extreme │ │ ├── default.nix │ │ ├── gen2 │ │ │ └── default.nix │ │ ├── gen3 │ │ │ └── default.nix │ │ └── gen4 │ │ │ └── default.nix │ ├── x1-nano │ │ ├── default.nix │ │ └── gen1 │ │ │ └── default.nix │ ├── x1 │ │ ├── 10th-gen │ │ │ └── default.nix │ │ ├── 11th-gen │ │ │ └── default.nix │ │ ├── 12th-gen │ │ │ └── default.nix │ │ ├── 13th-gen │ │ │ └── default.nix │ │ ├── 2nd-gen │ │ │ └── default.nix │ │ ├── 6th-gen │ │ │ ├── QHD │ │ │ │ └── default.nix │ │ │ └── default.nix │ │ ├── 7th-gen │ │ │ └── default.nix │ │ ├── 9th-gen │ │ │ └── default.nix │ │ ├── default.nix │ │ └── yoga │ │ │ ├── 7th-gen │ │ │ └── default.nix │ │ │ ├── 8th-gen │ │ │ └── default.nix │ │ │ └── default.nix │ ├── x13-yoga │ │ └── default.nix │ ├── x13 │ │ ├── OLD-BEHAVIOUR-DEPRECATED.md │ │ ├── amd │ │ │ └── default.nix │ │ ├── common.nix │ │ ├── default.nix │ │ ├── intel │ │ │ └── default.nix │ │ └── yoga │ │ │ ├── 3th-gen │ │ │ └── default.nix │ │ │ └── default.nix │ ├── x13s │ │ ├── README.md │ │ └── default.nix │ ├── x140e │ │ └── default.nix │ ├── x200s │ │ └── default.nix │ ├── x220 │ │ └── default.nix │ ├── x230 │ │ └── default.nix │ ├── x250 │ │ └── default.nix │ ├── x260 │ │ └── default.nix │ ├── x270 │ │ └── default.nix │ ├── x280 │ │ └── default.nix │ ├── x390 │ │ └── default.nix │ ├── yoga.nix │ ├── z │ │ ├── default.nix │ │ ├── gen1 │ │ │ ├── default.nix │ │ │ └── z13 │ │ │ │ └── default.nix │ │ └── gen2 │ │ │ ├── default.nix │ │ │ └── z13 │ │ │ ├── asound.conf │ │ │ └── default.nix │ └── z13 │ │ └── default.nix └── yoga │ ├── 6 │ └── 13ALC6 │ │ └── default.nix │ └── 7 │ ├── 14ARH7 │ ├── ATTR-SET-DEPRECATION.md │ ├── amdgpu │ │ └── default.nix │ ├── default.nix │ ├── nvidia │ │ └── default.nix │ └── shared.nix │ ├── 14IAH7 │ ├── hybrid │ │ └── default.nix │ ├── integrated │ │ └── default.nix │ └── shared.nix │ ├── 14ILL10 │ ├── README.md │ └── default.nix │ └── slim │ └── gen8 │ └── default.nix ├── malibal └── aon │ └── s1 │ ├── README.wiki │ └── default.nix ├── microchip ├── README.md ├── common │ ├── bsp │ │ ├── hss-payload-generator.nix │ │ ├── linux-icicle-kit.nix │ │ ├── patches │ │ │ └── 0001-Boot-environment-for-Microchip-Iciclle-Kit.patch │ │ ├── uboot.nix │ │ └── uboot.yaml │ └── modules.nix └── icicle-kit │ ├── default.nix │ └── overlay.nix ├── microsoft ├── hyper-v │ └── README.md ├── surface-pro │ ├── 3 │ │ ├── README.wiki │ │ └── default.nix │ └── 9 │ │ ├── README.md │ │ └── default.nix └── surface │ ├── OLD-BEHAVIOUR-DEPRECATION.md │ ├── README.md │ ├── TODO.org │ ├── common │ ├── default.nix │ └── kernel │ │ ├── 6.12 │ │ └── patches.nix │ │ ├── 6.14 │ │ └── patches.nix │ │ └── linux-package.nix │ ├── default.nix │ ├── surface-go │ ├── default.nix │ └── firmware │ │ └── ath10k │ │ ├── ath10k-replace.nix │ │ └── default.nix │ ├── surface-laptop-amd │ └── default.nix │ └── surface-pro-intel │ ├── default.nix │ └── thermal-conf.xml ├── milkv └── pioneer │ ├── README.md │ ├── default.nix │ ├── fip.nix │ ├── firmware.nix │ ├── linux.nix │ ├── linuxboot-initrd.nix │ ├── linuxboot-kernel.nix │ ├── opensbi.nix │ ├── sd-image-installer.nix │ ├── sd-image.nix │ ├── zsbl-increase-timeout.patch │ └── zsbl.nix ├── minisforum └── v3 │ ├── audio.nix │ ├── default.nix │ ├── dsdt.patch │ ├── power.nix │ ├── sensors.nix │ └── src.nix ├── morefine └── m600 │ └── default.nix ├── msi ├── b350-tomahawk │ └── default.nix ├── b550-a-pro │ └── default.nix ├── gl62 │ ├── README.md │ └── default.nix ├── gl65 │ └── 10SDR-492 │ │ └── default.nix └── gs60 │ └── default.nix ├── nxp ├── README.md ├── common │ ├── bsp │ │ ├── imx-atf.nix │ │ ├── imx-firmware.nix │ │ ├── imx-mkimage.nix │ │ ├── imx-optee-os.nix │ │ ├── imx-uboot.nix │ │ └── linux-imx8.nix │ ├── modules.nix │ └── patches │ │ ├── 0001-Add-UEFI-boot-for-imx8qm.patch │ │ └── 0001-Add-UEFI-boot-for-imx8qxp.patch ├── imx8mp-evk │ ├── bsp │ │ ├── imx8mp-atf.nix │ │ ├── imx8mp-boot.nix │ │ ├── imx8mp-firmware.nix │ │ ├── imx8mp-linux.nix │ │ ├── imx8mp-optee-os.nix │ │ └── imx8mp-uboot.nix │ ├── default.nix │ ├── modules.nix │ └── overlay.nix ├── imx8mq-evk │ ├── bsp │ │ ├── imx8mq-atf.nix │ │ ├── imx8mq-boot.nix │ │ ├── imx8mq-firmware.nix │ │ ├── imx8mq-linux.nix │ │ ├── imx8mq-optee-os.nix │ │ └── imx8mq-uboot.nix │ ├── default.nix │ ├── modules.nix │ └── overlay.nix ├── imx8qm-mek │ ├── default.nix │ └── overlay.nix └── imx8qxp-mek │ └── overlay.nix ├── olimex └── teres_i │ └── default.nix ├── omen ├── 14-fb0798ng │ ├── README.md │ └── default.nix ├── 15-ce002ns │ ├── README.md │ └── default.nix ├── 15-en0002np │ └── default.nix ├── 15-en0010ca │ ├── README.md │ └── default.nix ├── 15-en1007sa │ └── default.nix ├── 16-n0005ne │ ├── README.md │ └── default.nix └── 16-n0280nd │ ├── README.md │ └── default.nix ├── onenetbook └── 4 │ ├── default.nix │ └── goodix-stylus-mastykin │ ├── 5.12.12.patch.patch │ ├── 6.1.patch.patch │ ├── 6.12.patch.patch │ ├── Makefile │ └── default.nix ├── panasonic └── letsnote │ └── cf-lx4 │ └── default.nix ├── pcengines └── apu │ └── default.nix ├── pine64 ├── pinebook-pro │ ├── README.md │ ├── default.nix │ ├── keyboard-updater │ │ └── default.nix │ ├── overlay.nix │ └── sound │ │ └── reset-sound.rb ├── rockpro64 │ ├── README.md │ ├── console.nix │ └── default.nix └── star64 │ ├── README.md │ ├── default.nix │ ├── firmware.nix │ ├── irq-desc-to-data.patch │ ├── linux-5.15.nix │ ├── opensbi.nix │ ├── sd-image-installer.nix │ ├── sd-image.nix │ ├── spl-tool.nix │ ├── star64-8GB.dts │ └── uboot.nix ├── protectli └── vp4670 │ └── default.nix ├── purism └── librem │ ├── 13v3 │ ├── README.md │ └── default.nix │ ├── 15v3 │ └── 5r4 │ ├── README.md │ ├── audio.nix │ ├── default.nix │ ├── initrd.nix │ ├── kernel.nix │ ├── librem5-base │ └── default.nix │ ├── lockdown-fix.nix │ ├── u-boot │ ├── build.nix │ └── default.nix │ └── wifi.nix ├── radxa ├── README.md ├── default.nix ├── disko.nix ├── rock-4c-plus │ └── default.nix ├── rock-5b │ └── default.nix ├── rock-pi-4 │ └── default.nix └── rock-pi-e │ └── default.nix ├── raspberry-pi ├── 2 │ ├── README.org │ └── default.nix ├── 3 │ └── default.nix ├── 4 │ ├── apply-overlays-dtmerge.nix │ ├── audio.nix │ ├── backlight.nix │ ├── bluetooth.nix │ ├── cpu-revision.nix │ ├── default.nix │ ├── digi-amp-plus.nix │ ├── dwc2.nix │ ├── gpio.nix │ ├── i2c.nix │ ├── leds.nix │ ├── modesetting.nix │ ├── pkgs-overlays.nix │ ├── poe-hat.nix │ ├── poe-plus-hat.nix │ ├── pwm0.nix │ ├── tc358743.nix │ ├── touch-ft5406.nix │ ├── tv-hat.nix │ └── xhci.nix └── 5 │ └── default.nix ├── rockchip ├── default.nix ├── disko.nix ├── rk3328 │ └── default.nix ├── rk3399 │ ├── default.nix │ └── disko.nix └── rk3588 │ └── default.nix ├── samsung └── np900x3c │ ├── README.wiki │ └── default.nix ├── slimbook └── hero │ └── rpl-rtx │ ├── README.md │ └── default.nix ├── starfive └── visionfive │ ├── v1 │ ├── README.md │ ├── default.nix │ ├── firmware.nix │ ├── linux.nix │ ├── sd-image-installer.nix │ ├── sd-image.nix │ └── uboot.nix │ └── v2 │ ├── README.md │ ├── default.nix │ ├── firmware.nix │ ├── opensbi.nix │ ├── sd-image-installer.nix │ ├── sd-image.nix │ ├── spl-tool.nix │ └── uboot.nix ├── starlabs ├── README.md └── starlite │ └── i5 │ ├── README.md │ └── default.nix ├── supermicro ├── a1sri-2758f │ └── default.nix ├── default.nix ├── m11sdv-8c-ln4f │ ├── README.md │ └── default.nix ├── x10sll-f │ └── default.nix └── x12scz-tln4f │ └── default.nix ├── system76 ├── darp6 │ └── default.nix ├── default.nix ├── galp5-1650 │ └── default.nix └── gaze18 │ └── default.nix ├── tests ├── build-profile.nix ├── flake.lock ├── flake.nix ├── pyproject.toml └── run.py ├── toshiba └── swanky │ ├── README.md │ └── default.nix ├── tuxedo ├── aura │ └── 15 │ │ └── gen1 │ │ └── default.nix ├── infinitybook │ ├── default.nix │ ├── gen9-intel │ │ └── default.nix │ ├── pro14 │ │ ├── gen7 │ │ │ ├── README.md │ │ │ └── default.nix │ │ └── gen9 │ │ │ ├── README.md │ │ │ ├── default.nix │ │ │ └── intel │ │ │ └── default.nix │ └── v4 │ │ └── default.nix └── pulse │ ├── 14 │ └── gen3 │ │ ├── README.md │ │ └── default.nix │ └── 15 │ └── gen2 │ ├── README.md │ └── default.nix └── xiaomi ├── fix-boot-quirk.nix └── redmibook └── 16-pro-2024 ├── README.md └── default.nix /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ###### Description of changes 2 | 3 | 4 | ###### Things done 5 | 6 | 7 | 8 | - [ ] Tested the changes in your own NixOS Configuration 9 | - [ ] Tested the changes end-to-end by using your fork of `nixos-hardware` and 10 | importing it via `` or Flake input 11 | 12 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: "Test" 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - master 7 | jobs: 8 | tests: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: cachix/install-nix-action@v31 13 | - run: nix run ./tests#run . 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | ,* 3 | .*.swp 4 | .*.swo 5 | result 6 | result-* 7 | .version-suffix 8 | 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | queue_rules: 2 | - name: default 3 | merge_conditions: 4 | - check-success=tests 5 | batch_size: 5 6 | merge_method: rebase 7 | pull_request_rules: 8 | - name: merge using the merge queue 9 | conditions: 10 | - base=master 11 | - label~=merge-queue|dependencies 12 | actions: 13 | queue: {} 14 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | beagleboard/pocketbeagle @yegortimoshenko 2 | dell/xps/13-9370 @moredread 3 | dell/xps/13-9380 @kalbasit 4 | dell/xps/15-9560 @Lyndeno 5 | lenovo/thinkpad/x230 @makefu @yegortimoshenko 6 | lenovo/thinkpad/x250 @Mic92 7 | pcengines/apu @yegortimoshenko 8 | pine64/rockpro64 @tomfitzhenry 9 | pine64/star64 @fgaz 10 | purism/librem/13v3 @yegortimoshenko 11 | system76/darp6 @khumba 12 | framework @emiller88 13 | tuxedo/pulse/15/gen2 @trueNAHO 14 | tuxedo/pulse/14/gen3 @gabyx @britter @trueNAHO 15 | -------------------------------------------------------------------------------- /acer/aspire/4810t/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ]; 8 | 9 | boot = { 10 | initrd.kernelModules = [ "ata_piix" ]; 11 | kernelParams = [ 12 | "apm=on" 13 | "acpi=on" 14 | "vga=0x317" 15 | "video=vesafb:ywrap" 16 | 17 | # Important, disable KMS to fix backlight regulation: 18 | "nomodeset" 19 | ]; 20 | }; 21 | 22 | # TODO: reverse compat 23 | services.xserver = { 24 | defaultDepth = lib.mkDefault 24; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /airis/n990/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ ../../common/pc/laptop ]; 5 | 6 | boot = { 7 | initrd.kernelModules = [ "pata_via" ]; 8 | 9 | kernelParams = [ 10 | "apm=on" 11 | "acpi=on" 12 | "vga=0x317" # 1024x768 13 | "console=tty1" 14 | "video=vesafb:ywrap" # Faster scroll 15 | ]; 16 | }; 17 | 18 | hardware.firmware = with pkgs; [ intel2200BGFirmware ]; 19 | 20 | services.xserver.videoDrivers = [ "openchrome" ]; 21 | } 22 | -------------------------------------------------------------------------------- /aoostar/r1/n100/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel/alder-lake 4 | ]; 5 | 6 | # lopter@(2025-02-06): according to sensors-detect this comes with an ITE 7 | # IT8613E super io chip, which is not officialy supported yet. See also: 8 | # 9 | # - unofficial driver: https://github.com/frankcrawford/it87 10 | # - reddit thread on with useful information to configure pwm from the bios: 11 | # https://www.reddit.com/r/MiniPCs/comments/1bnkg1u/aoostar_r1r7_question_does_the_fan_header_support/ 12 | } 13 | -------------------------------------------------------------------------------- /apple/README.md: -------------------------------------------------------------------------------- 1 | ## Switching Cmd and Alt/AltGr 2 | 3 | This will switch the left Alt and Cmd key as well as the right Alt/AltGr and Cmd key. 4 | 5 | ```nix 6 | boot.kernelParams = [ 7 | "hid_apple.swap_opt_cmd=1" 8 | ]; 9 | ``` 10 | 11 | Reference: https://wiki.archlinux.org/index.php/Apple_Keyboard#Switching_Cmd_and_Alt/AltGr 12 | -------------------------------------------------------------------------------- /apple/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | boot.kernelParams = [ 5 | "hid_apple.iso_layout=0" 6 | ]; 7 | 8 | hardware.facetimehd.enable = lib.mkDefault 9 | (config.nixpkgs.config.allowUnfree or false); 10 | 11 | services.mbpfan.enable = lib.mkDefault true; 12 | } 13 | -------------------------------------------------------------------------------- /apple/imac/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../common/cpu/intel 5 | ../../common/pc/laptop 6 | ../../common/pc/ssd 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /apple/macbook-air/3/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../. 6 | ../../../common/cpu/intel 7 | ../../../common/pc/laptop 8 | ../../../common/pc/ssd 9 | ]; 10 | 11 | # Built-in iSight is recognized by the generic uvcvideo kernel module 12 | hardware.facetimehd.enable = false; 13 | } 14 | -------------------------------------------------------------------------------- /apple/macbook-air/4/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/intel/sandy-bridge 7 | ]; 8 | 9 | boot.kernelParams = [ 10 | "acpi_backlight=vendor" 11 | ]; 12 | 13 | services.xserver.deviceSection = lib.mkDefault '' 14 | Option "TearFree" "true" 15 | ''; 16 | } 17 | -------------------------------------------------------------------------------- /apple/macbook-air/6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | boot = { 7 | # Divides power consumption by two. 8 | kernelParams = [ "acpi_osi=" ]; 9 | }; 10 | 11 | services.xserver.deviceSection = lib.mkDefault '' 12 | Option "TearFree" "true" 13 | ''; 14 | } 15 | -------------------------------------------------------------------------------- /apple/macbook-air/7/README.md: -------------------------------------------------------------------------------- 1 | # MacBook Air 7,X 2 | 3 | ### For wifi driver 4 | broadcomt_sta was the best working driver I could find, however on the normal kernel, you need to `sudo modprobe -r wl` and `sudo modprobe wl`, however it was fully working on the zen kernel. 5 | 6 | -------------------------------------------------------------------------------- /apple/macbook-air/7/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /apple/macbook-air/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../common/cpu/intel 5 | ../../common/pc/laptop 6 | ../../common/pc/ssd 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /apple/macbook-pro/10-1/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/pc/ssd 7 | ../../../common/gpu/24.05-compat.nix 8 | ../../../common/gpu/nvidia/kepler 9 | ]; 10 | 11 | # TODO: reverse compat 12 | hardware.graphics.enable32Bit = lib.mkDefault true; 13 | 14 | services.xserver = { 15 | # TODO: we should not enable unfree drivers 16 | # when there is an alternative (i.e. nouveau) 17 | videoDrivers = [ "nvidia" ]; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /apple/macbook-pro/11-1/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../../common/pc/ssd 6 | ../../../common/cpu/intel/haswell 7 | ]; 8 | 9 | # broadcom-wl 10 | hardware.enableRedistributableFirmware = lib.mkDefault true; 11 | # nixos-generate-config doesn't detect this automatically. 12 | boot.extraModulePackages = with config.boot.kernelPackages; [ broadcom_sta ]; 13 | boot.kernelModules = [ "wl" ]; 14 | } 15 | -------------------------------------------------------------------------------- /apple/macbook-pro/11-5/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | 3 | let 4 | 5 | inherit (config.boot) kernelPackages; 6 | 7 | in 8 | 9 | { 10 | imports = [ 11 | ../. 12 | ../../../common/pc/ssd 13 | ]; 14 | 15 | # Enable broadcom-43xx firmware 16 | hardware.enableRedistributableFirmware = lib.mkDefault true; 17 | 18 | services.udev.extraRules = 19 | # Disable XHC1 wakeup signal to avoid resume getting triggered some time 20 | # after suspend. Reboot required for this to take effect. 21 | lib.optionalString 22 | (lib.versionAtLeast kernelPackages.kernel.version "3.13") 23 | ''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"''; 24 | } 25 | -------------------------------------------------------------------------------- /apple/macbook-pro/12-1/README.md: -------------------------------------------------------------------------------- 1 | # MacBook Pro 12,1 2 | 3 | ## Wireless won't get reconnected after resume/hibernate 4 | 5 | The wifi driver is unloaded before suspend/hibernate to workaround driver issues. 6 | This means it might be required to restart your wifi deamon i.e. wpa_supplicant: 7 | 8 | ```nix 9 | powerManagement.powerUpCommands = '' 10 | ${pkgs.systemd}/bin/systemctl restart wpa_supplicant.service 11 | ''; 12 | }; 13 | ``` 14 | 15 | You can apply this to your network management software of choice. 16 | -------------------------------------------------------------------------------- /apple/macbook-pro/14-1/disable-nvme-d3cold.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | driver_path=/sys/bus/pci/devices/0000:01:00.0 4 | 5 | if [[ ! -e "$driver_path" ]]; then 6 | echo "$driver_path does not exist, exiting..." 7 | exit 1 8 | fi 9 | 10 | driver=$(basename $(readlink "$driver_path/driver")) 11 | 12 | if [[ "$driver" -ne "nvme" ]]; then 13 | echo "$driver_path is not an NVME device, got $driver, exiting..." 14 | exit 1 15 | fi 16 | 17 | echo 0 > "$driver_path/d3cold_allowed" 18 | 19 | -------------------------------------------------------------------------------- /apple/macbook-pro/8-1/README.md: -------------------------------------------------------------------------------- 1 | # MacBook Pro 8,1 2 | 3 | ## Enable unfree packages in your nix config for b43-firmware (wifi driver) to work 4 | 5 | ### For b43-firmware only (Ideal) 6 | 7 | ```nix 8 | {lib, ...}: 9 | 10 | { 11 | nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ 12 | "b43-firmware" 13 | ]; 14 | } 15 | 16 | ``` 17 | 18 | ### For all packages 19 | 20 | ```nix 21 | { 22 | nixpkgs.config.allowUnfree = true; 23 | } 24 | ``` 25 | -------------------------------------------------------------------------------- /apple/macbook-pro/8-1/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/intel/sandy-bridge 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | networking.enableB43Firmware = lib.mkDefault true; 11 | } 12 | -------------------------------------------------------------------------------- /apple/macbook-pro/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../common/cpu/intel 5 | ../../common/pc/laptop 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /apple/macmini/4/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | ... 4 | }: 5 | let 6 | inherit (lib) mkDefault; 7 | in 8 | { 9 | imports = [ 10 | ../. 11 | ../../../common/gpu/24.05-compat.nix 12 | ]; 13 | 14 | services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ]; 15 | 16 | hardware = { 17 | graphics = { 18 | enable = mkDefault true; 19 | enable32Bit = mkDefault true; 20 | }; 21 | 22 | nvidia = { 23 | modesetting.enable = mkDefault true; 24 | powerManagement.enable = mkDefault false; 25 | powerManagement.finegrained = mkDefault false; 26 | open = mkDefault false; 27 | nvidiaSettings = mkDefault true; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /apple/macmini/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../common/cpu/intel 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /apple/t2/pkgs/linux-t2/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, linux_6_12, ... }@args: 2 | 3 | callPackage ./generic.nix args { 4 | kernel = linux_6_12; 5 | patchesFile = ./stable.json; 6 | } 7 | -------------------------------------------------------------------------------- /apple/t2/pkgs/linux-t2/latest.nix: -------------------------------------------------------------------------------- 1 | { callPackage, linux_6_14, ... }@args: 2 | 3 | callPackage ./generic.nix args { 4 | kernel = linux_6_14; 5 | patchesFile = ./latest.json; 6 | } 7 | -------------------------------------------------------------------------------- /asus/ally/rc71l/README.md: -------------------------------------------------------------------------------- 1 | # [ROG Ally (2023)](https://rog.asus.com/gaming-handhelds/rog-ally/rog-ally-2023/) 2 | 3 | ## BIOS 4 | 5 | The ROG Ally has a troublesome history with different BIOS versions creating different issues. 6 | At the time of writing, the current BIOS version 330 allows for working audio without further kernel patches. 7 | 8 | ## Further resources 9 | 10 | - The steam module from https://github.com/Jovian-Experiments/Jovian-NixOS can be used to boot into the Steam Deck UI -------------------------------------------------------------------------------- /asus/ally/rc71l/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/amd 5 | ../../../common/cpu/amd/pstate.nix 6 | ../../../common/gpu/amd 7 | ../../../common/pc/laptop 8 | ../../../common/pc/ssd 9 | ../../battery.nix 10 | ]; 11 | 12 | # 6.5 adds many fixes and improvements for the Ally 13 | # This includes for example performance, audio and bluetooth 14 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.5") (lib.mkDefault pkgs.linuxPackages_latest); 15 | } 16 | -------------------------------------------------------------------------------- /asus/fa507nv/README.md: -------------------------------------------------------------------------------- 1 | # ASUS TUF A15 FA507NV 2 | As Nvidia offload is not available for AMD CPU, nvidia prime is using sync. Additionally the kernel is set to the latest stable release(using boot.kernelPackages = pkgs.linuxPackages_latest) as the keyboard and wireless drivers does not work in the default NixOS kernel which is the LTS kernel. -------------------------------------------------------------------------------- /asus/fa507rm/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/amd 6 | ../../common/gpu/nvidia/prime.nix 7 | ../../common/gpu/nvidia/ampere 8 | ../../common/pc/laptop 9 | ../../common/pc/ssd 10 | ]; 11 | 12 | hardware.nvidia.prime = { 13 | amdgpuBusId = "PCI:5:0:0"; 14 | nvidiaBusId = "PCI:1:0:0"; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /asus/fx504gd/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ 4 | ../../common/cpu/intel 5 | ../../common/pc/laptop 6 | ]; 7 | 8 | #Nouveau doesn't work at all on this model. 9 | boot.kernelParams = [ "nouveau.modeset=0" ]; 10 | } 11 | -------------------------------------------------------------------------------- /asus/fx506hm/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = 5 | [ 6 | ../../common/cpu/intel 7 | ../../common/gpu/nvidia 8 | ../../common/gpu/nvidia/prime.nix 9 | ../../common/pc/laptop 10 | ../../common/pc/ssd 11 | ../battery.nix 12 | ]; 13 | 14 | hardware.nvidia = 15 | { 16 | modesetting.enable = lib.mkDefault true; 17 | open = lib.mkIf (lib.versionAtLeast config.hardware.nvidia.package.version "555") true; 18 | 19 | prime = 20 | { 21 | intelBusId = "PCI:0:2:0"; 22 | nvidiaBusId = "PCI:1:0:0"; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /asus/pro-ws-x570-ace/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../common/pc 4 | ../../common/pc/ssd 5 | ../../common/cpu/amd/pstate.nix 6 | ]; 7 | 8 | boot.kernelModules = [ 9 | # Nuvoton NCT6798D - temperature, voltage and RPM 10 | "nct6775" 11 | 12 | # a single "temp1" sensor, always at "+31.9°C" 13 | # commented because it's not useful, but left here for reference 14 | # Bus `SMBus PIIX4 adapter port 1 at 0b20' 15 | # Busdriver `i2c_piix4', I2C address 0x4f 16 | # Chip `ds75' 17 | # "lm75" 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /asus/rog-strix/g513im/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/amd 4 | ../../../common/cpu/amd/pstate.nix 5 | ../../../common/gpu/nvidia 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/ampere 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ../../battery.nix 11 | ]; 12 | 13 | hardware.nvidia.prime = { 14 | amdgpuBusId = "PCI:05:00:0"; 15 | nvidiaBusId = "PCI:01:00:0"; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /asus/rog-strix/g533zw/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/ampere 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ../../battery.nix 11 | ]; 12 | 13 | hardware.nvidia.prime = { 14 | intelBusId = "PCI:0:2:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /asus/rog-strix/g713ie/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/amd 4 | ../../../common/cpu/amd/pstate.nix 5 | ../../../common/gpu/nvidia 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/ampere 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ../../battery.nix 11 | ]; 12 | 13 | hardware.nvidia.prime = { 14 | amdgpuBusId = "PCI:5:0:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /asus/rog-strix/g733qs/hda-jack-retask.fw: -------------------------------------------------------------------------------- 1 | [codec] 2 | 0x10ec0285 0x10431e6e 0 3 | 4 | [pincfg] 5 | 0x12 0x90a60140 6 | 0x13 0x40000000 7 | 0x14 0x90170152 8 | 0x16 0x411111f0 9 | 0x17 0x90170110 10 | 0x18 0x411111f0 11 | 0x19 0x03a19020 12 | 0x1a 0x411111f0 13 | 0x1b 0x411111f0 14 | 0x1d 0x40663a45 15 | 0x1e 0x90170151 16 | 0x21 0x03211020 17 | -------------------------------------------------------------------------------- /asus/wireless-ac1300.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | 3 | { 4 | boot.extraModulePackages = with config.boot.kernelPackages; [ rtl8812au ]; 5 | boot.kernelModules = [ "8812au" ]; 6 | } 7 | -------------------------------------------------------------------------------- /asus/zenbook/ux481/intelgpu/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../shared.nix 5 | ../../../../common/gpu/intel/comet-lake 6 | ../../../../common/gpu/nvidia/disable.nix # Disabling nvidia 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /asus/zenbook/ux481/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: 2 | { 3 | imports = [ 4 | ../shared.nix 5 | ../../../../common/gpu/nvidia/pascal 6 | ../../../../common/gpu/nvidia/prime.nix 7 | ]; 8 | 9 | hardware.nvidia = { 10 | prime = { 11 | intelBusId = "PCI:0:2:0"; 12 | nvidiaBusId = "PCI:2:0:0"; 13 | }; 14 | 15 | dynamicBoost.enable = lib.mkForce false; # Dynamic boost is not supported on Pascal architeture 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /asus/zenbook/ux481/shared.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | { 7 | imports = [ 8 | ../../../common/cpu/intel/comet-lake/cpu-only.nix 9 | ../../../common/pc/laptop 10 | ../../../common/pc/ssd 11 | ../../battery.nix 12 | ]; 13 | 14 | boot.kernelParams = [ 15 | # These options are needed for suspend to work, 16 | # otherwise the nvme will be mounted read-only on resume 17 | "pcie_aspm=off" 18 | "pcie_port_pm=off" 19 | "nvme_core.default_ps_max_latency_us=0" 20 | "mem_sleep_default=deep" 21 | ]; 22 | 23 | services.thermald.enable = lib.mkDefault true; 24 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 25 | } 26 | -------------------------------------------------------------------------------- /asus/zephyrus/ga402x/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | assertions = [ 5 | { 6 | assertion = false; 7 | message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md for more details"; 8 | } 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /asus/zephyrus/ga502/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/turing 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ]; 11 | 12 | hardware.nvidia.prime = { 13 | amdgpuBusId = "PCI:6:0:0"; 14 | nvidiaBusId = "PCI:1:0:0"; 15 | }; 16 | 17 | # fixes mic mute button 18 | services.udev.extraHwdb = '' 19 | evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* 20 | KEYBOARD_KEY_ff31007c=f20 21 | ''; 22 | } 23 | -------------------------------------------------------------------------------- /asus/zephyrus/ga503/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/ampere 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ]; 11 | 12 | hardware.nvidia.prime = { 13 | amdgpuBusId = "PCI:7:0:0"; 14 | nvidiaBusId = "PCI:1:0:0"; 15 | }; 16 | 17 | # fixes mic mute button 18 | services.udev.extraHwdb = '' 19 | evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* 20 | KEYBOARD_KEY_ff31007c=f20 21 | ''; 22 | } 23 | -------------------------------------------------------------------------------- /asus/zephyrus/gu603h/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/ampere 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ]; 11 | 12 | hardware.nvidia.prime = { 13 | intelBusId = "PCI:0:2:0"; 14 | nvidiaBusId = "PCI:1:0:0"; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /asus/zephyrus/shared/backlight.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | # These flags are used to enable backlight control when the dGPU is working in hybrid mode 4 | boot.kernelParams = [ 5 | "i915.enable_dpcd_backlight=1" 6 | "nvidia.NVreg_EnableBacklightHandler=0" 7 | "nvidia.NVReg_RegistryDwords=EnableBrightnessControl=0" 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /audio-gd/compass2.nix: -------------------------------------------------------------------------------- 1 | { 2 | boot = { 3 | extraModprobeConfig = lib.mkDefault '' 4 | options snd slots=snd_usb_audio,snd-hda-intel 5 | ''; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /beagleboard/pocketbeagle/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | boot.kernelParams = [ "console=ttyO0,115200n8" ]; 5 | 6 | boot.loader = { 7 | generic-extlinux-compatible.enable = lib.mkDefault true; 8 | grub.enable = lib.mkDefault false; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /chuwi/minibook-x/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | imports = [ 3 | ../../common/cpu/intel 4 | ../../common/pc/laptop 5 | ../../common/pc/ssd 6 | ../../common/hidpi.nix 7 | ]; 8 | # Fixes the display being rotated 90 degrees. 9 | boot.kernelParams = 10 | [ "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" ]; 11 | } 12 | -------------------------------------------------------------------------------- /common/cpu/amd/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | hardware.cpu.amd.updateMicrocode = 5 | lib.mkDefault config.hardware.enableRedistributableFirmware; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/amd/zenpower.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | # Enables the zenpower sensor in lieu of the k10temp sensor on Zen CPUs https://git.exozy.me/a/zenpower3 4 | # On Zen CPUs zenpower produces much more data entries 5 | 6 | imports = [ ./. ]; 7 | boot.blacklistedKernelModules = [ "k10temp" ]; 8 | boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ]; 9 | boot.kernelModules = [ "zenpower" ]; 10 | } 11 | -------------------------------------------------------------------------------- /common/cpu/intel/alder-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/alder-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/alder-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/bay-trail/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/bay-trail/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/bay-trail 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/braswell/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/braswell/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/braswell 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/broadwell/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/broadwell/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/broadwell 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/coffee-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/coffee-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/coffee-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/comet-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/comet-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/comet-lake 5 | ]; 6 | 7 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 8 | } 9 | -------------------------------------------------------------------------------- /common/cpu/intel/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | { 3 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 4 | } 5 | -------------------------------------------------------------------------------- /common/cpu/intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../gpu/intel 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/elkhart-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/elkhart-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/elkhart-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/haswell/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/haswell/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/haswell 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/jasper-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/jasper-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/jasper-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/kaby-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/kaby-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/kaby-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/lunar-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/lunar-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/lunar-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/meteor-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ../../../gpu/intel/meteor-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/raptor-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/sandy-bridge/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/sandy-bridge/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/sandy-bridge 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/skylake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/skylake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/skylake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/tiger-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/tiger-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/tiger-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/cpu/intel/whiskey-lake/cpu-only.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../cpu-only.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/cpu/intel/whiskey-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cpu-only.nix 4 | ../../../gpu/intel/whiskey-lake 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/gpu/amd/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ ../24.05-compat.nix ]; 5 | config = { 6 | services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; 7 | 8 | hardware.graphics = { 9 | enable = lib.mkDefault true; 10 | enable32Bit = lib.mkDefault true; 11 | }; 12 | 13 | hardware.amdgpu.initrd.enable = lib.mkDefault true; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /common/gpu/amd/sea-islands/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | # Explicitly set amdgpu support in place of radeon 4 | boot.kernelParams = [ "radeon.cik_support=0" "amdgpu.cik_support=1" ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/gpu/amd/southern-islands/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | # Explicitly set amdgpu support in place of radeon 4 | boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/gpu/intel/alder-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 5 | } 6 | -------------------------------------------------------------------------------- /common/gpu/intel/bay-trail/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | hardware.intelgpu = { 7 | vaapiDriver = "intel-vaapi-driver"; 8 | enableHybridCodec = true; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /common/gpu/intel/braswell/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | hardware.intelgpu = { 7 | vaapiDriver = "intel-vaapi-driver"; 8 | enableHybridCodec = true; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /common/gpu/intel/broadwell/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | hardware.intelgpu = { 7 | vaapiDriver = "intel-vaapi-driver"; 8 | enableHybridCodec = true; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /common/gpu/intel/coffee-lake/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | boot.kernelParams = [ 7 | "i915.enable_guc=2" 8 | ]; 9 | 10 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 11 | } 12 | -------------------------------------------------------------------------------- /common/gpu/intel/comet-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | boot.kernelParams = [ "i915.enable_guc=2" ]; 5 | 6 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/intel/disable.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | boot.blacklistedKernelModules = lib.mkDefault [ "i915" ]; 5 | # KMS will load the module, regardless of blacklisting 6 | boot.kernelParams = lib.mkDefault [ "i915.modeset=0" ]; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/intel/elkhart-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | boot.kernelParams = [ "i915.enable_guc=2" ]; 5 | 6 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/intel/haswell/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | hardware.intelgpu = { 7 | vaapiDriver = "intel-vaapi-driver"; 8 | enableHybridCodec = true; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /common/gpu/intel/jasper-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | boot.kernelParams = [ "i915.enable_guc=2" ]; 5 | 6 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/intel/kaby-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | boot.kernelParams = [ 5 | "i915.enable_guc=2" 6 | "i915.enable_fbc=1" 7 | "i915.enable_psr=2" 8 | ]; 9 | 10 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 11 | } 12 | -------------------------------------------------------------------------------- /common/gpu/intel/lunar-lake/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | { 3 | imports = [ ../. ]; 4 | hardware.intelgpu = { 5 | driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe"; 6 | vaapiDriver = "intel-media-driver"; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /common/gpu/intel/meteor-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 5 | } 6 | -------------------------------------------------------------------------------- /common/gpu/intel/raptor-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /common/gpu/intel/sandy-bridge/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | # Enables RC6, RC6p and RC6pp. 5 | # Last two are only available on Sandy Bridge CPUs (circa 2011). 6 | boot.kernelParams = [ "i915.enable_rc6=7" ]; 7 | 8 | hardware.intelgpu.vaapiDriver = "intel-vaapi-driver"; 9 | } 10 | -------------------------------------------------------------------------------- /common/gpu/intel/skylake/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | boot.kernelParams = [ 7 | "i915.enable_guc=2" 8 | ]; 9 | 10 | # VP9 decoding not supported when using intel-media-driver 11 | # https://github.com/intel/media-driver/issues/1024 12 | # NixOS Wiki recommends using the legacy intel-vaapi-driver with the hybrid codec over that one for Skylake. 13 | # https://wiki.nixos.org/wiki/Accelerated_Video_Playback 14 | hardware.intelgpu = { 15 | vaapiDriver = "intel-vaapi-driver"; 16 | enableHybridCodec = true; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /common/gpu/intel/tiger-lake/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | { 3 | imports = [ ../. ]; 4 | config = { 5 | boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "i915") [ "i915.enable_guc=3" ]; 6 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /common/gpu/intel/whiskey-lake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../. ]; 3 | 4 | boot.kernelParams = [ "i915.enable_guc=2" ]; 5 | 6 | hardware.intelgpu.vaapiDriver = "intel-media-driver"; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/nvidia/ada-lovelace/default.nix: -------------------------------------------------------------------------------- 1 | {lib, config, ...}: 2 | let 3 | nvidiaPackage = config.hardware.nvidia.package; 4 | in 5 | { 6 | imports = [ ../. ]; 7 | 8 | # enable the open source drivers if the package supports it 9 | hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware); 10 | } 11 | -------------------------------------------------------------------------------- /common/gpu/nvidia/ampere/default.nix: -------------------------------------------------------------------------------- 1 | {lib, config, ...}: 2 | let 3 | nvidiaPackage = config.hardware.nvidia.package; 4 | in 5 | { 6 | imports = [ ../. ]; 7 | 8 | # enable the open source drivers if the package supports it 9 | hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware); 10 | } 11 | -------------------------------------------------------------------------------- /common/gpu/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ ../24.05-compat.nix ]; 5 | services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; 6 | } 7 | -------------------------------------------------------------------------------- /common/gpu/nvidia/fermi/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ ../. ]; 4 | 5 | # The open source driver does not support Fermi GPUs. 6 | hardware.nvidia.open = false; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/nvidia/kepler/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: 2 | { 3 | imports = [ ../. ]; 4 | 5 | # The open source driver does not support Kepler GPUs. 6 | hardware.nvidia.open = false; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/nvidia/maxwell/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: 2 | { 3 | imports = [ ../. ]; 4 | 5 | # The open source driver does not support Maxwell GPUs. 6 | hardware.nvidia.open = false; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/nvidia/pascal/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: 2 | { 3 | imports = [ ../. ]; 4 | 5 | # The open source driver does not support Pascal GPUs. 6 | hardware.nvidia.open = false; 7 | } 8 | -------------------------------------------------------------------------------- /common/gpu/nvidia/prime-sync.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | 3 | { 4 | imports = [ ./. ]; 5 | 6 | hardware.nvidia.prime = { 7 | # For people who want to use sync instead of offload. Especially for AMD CPU users 8 | sync.enable = lib.mkOverride 990 true; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /common/gpu/nvidia/turing/default.nix: -------------------------------------------------------------------------------- 1 | {lib, config, ...}: 2 | let 3 | nvidiaPackage = config.hardware.nvidia.package; 4 | in 5 | { 6 | imports = [ ../. ]; 7 | 8 | # enable the open source drivers if the package supports it 9 | hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware); 10 | } 11 | -------------------------------------------------------------------------------- /common/hidpi.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | config, 5 | ... 6 | }: 7 | let 8 | # Starting with kernel 6.8, the console font is set in the kernel automatically to a 16x32 font: 9 | # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfd19a5004eff03755967086aa04254c3d91b8ec 10 | oldKernel = lib.versionOlder config.boot.kernelPackages.kernel.version "6.8"; 11 | in 12 | { 13 | # Just set the console font, don't mess with the font settings 14 | console.font = lib.mkIf oldKernel ( 15 | lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz" 16 | ); 17 | console.earlySetup = lib.mkIf oldKernel (lib.mkDefault true); 18 | } 19 | -------------------------------------------------------------------------------- /common/pc/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [ 5 | "ath3k" 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /common/pc/hdd/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | warnings = [ 3 | '' 4 | DEPRECATED: The module has been deprecated. 5 | 6 | This module has no effect and will be removed in a future release. 7 | '' 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /common/pc/laptop/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | # Gnome 40 introduced a new way of managing power, without tlp. 7 | # However, these 2 services clash when enabled simultaneously. 8 | # https://github.com/NixOS/nixos-hardware/issues/260 9 | services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") 10 | || !config.services.power-profiles-daemon.enable); 11 | } 12 | -------------------------------------------------------------------------------- /common/pc/laptop/hdd/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | # Hard disk protection if the laptop falls: 5 | services.hdapsd.enable = lib.mkDefault true; 6 | } 7 | -------------------------------------------------------------------------------- /common/pc/ssd/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | services.fstrim.enable = lib.mkDefault true; 5 | } 6 | -------------------------------------------------------------------------------- /deciso/dec/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | boot.kernelParams = [ "console=ttyS0,115200n8" ]; 3 | } 4 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | # This file is necessary so nix-env -qa does not break, 2 | # when nixos-hardware is used as a channel 3 | {} 4 | -------------------------------------------------------------------------------- /dell/e7240/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../latitude/e7240/default.nix 4 | ]; 5 | 6 | warnings = [ 7 | '' 8 | DEPRECATED: Importing dell/e7240 is deprecated. Use dell/latitude/e7240 instead. 9 | 10 | This module will be removed in a future release. 11 | '' 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /dell/g3/3779/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/pascal 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ]; 11 | 12 | # Specify bus id of Nvidia and Intel graphics 13 | hardware.nvidia.prime = { 14 | intelBusId = "PCI:0:2:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | 18 | # Cooling management 19 | services.thermald.enable = lib.mkDefault true; 20 | 21 | # Use same ACPI identifier as Dell Ubuntu 22 | boot.kernelParams = [ 23 | "acpi_osi=Linux-Dell-Video" 24 | ]; 25 | } 26 | -------------------------------------------------------------------------------- /dell/inspiron/14-5420/README.md: -------------------------------------------------------------------------------- 1 | # Dell Inspiron 14 5420 2 | 3 | ### Hardware 4 | - CPU: Intel® Core™ i7-1260P Processor 5 | - GPU: Intel® Iris® Xe Graphics 6 | 7 | ### Other Info 8 | `fwupd` is used to receive firmware updates from vendors. This device is in its [supported devices list](https://fwupd.org/lvfs/devices/) 9 | 10 | `thermald` is used to achieve better thermal behaviour 11 | 12 | ##### TLP 13 | TLP is a battery power optimizer for laptops. It is enabled by default, however, since it conflicts with power-profiles-daemon which is GNOME's power management system, TLP will not be installed with if power-profiles-daemon or a recent version of GNOME is present. 14 | -------------------------------------------------------------------------------- /dell/inspiron/14-5420/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | hardware = { 11 | enableRedistributableFirmware = lib.mkDefault true; 12 | }; 13 | 14 | services = { 15 | fwupd = { 16 | enable = lib.mkDefault true; 17 | }; 18 | thermald = { 19 | enable = lib.mkDefault true; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /dell/inspiron/3442/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/gpu/intel/haswell 8 | ]; 9 | 10 | hardware.enableAllFirmware = lib.mkDefault true; 11 | 12 | services = { 13 | fwupd.enable = lib.mkDefault true; 14 | thermald.enable = lib.mkDefault true; 15 | }; 16 | 17 | boot = { 18 | # needs to be explicitly loaded or else bluetooth/wifi won't work. 19 | kernelModules = [ "wl" ]; 20 | extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /dell/inspiron/5509/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/intel/tiger-lake 5 | ../../../common/pc/laptop 6 | ../../../common/pc/ssd 7 | ]; 8 | 9 | # Essential Firmware 10 | hardware.enableRedistributableFirmware = lib.mkDefault true; 11 | 12 | # Cooling Management 13 | services.thermald.enable = lib.mkDefault true; 14 | 15 | # Touchpad 16 | services.libinput.touchpad = { 17 | tapping = true; 18 | tappingDragLock = true; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /dell/inspiron/5515/fix_touchpad.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | unload () { 6 | if modprobe -r "$1" 2>&1; 7 | then echo ok 8 | else echo fail 9 | fi 10 | } 11 | 12 | wait_unload() { 13 | while sleep 1; do 14 | output="$(unload "$1")" 15 | case "$output" in 16 | *is\ in\ use*) :;; 17 | *ok*) return 0;; 18 | *) echo "modprobe said: $output"; echo giving up; return 1; 19 | esac 20 | done 21 | } 22 | 23 | wait_unload i2c_hid_acpi 24 | wait_unload i2c_hid 25 | modprobe i2c_hid 26 | modprobe i2c_hid_acpi 27 | -------------------------------------------------------------------------------- /dell/inspiron/7405/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | with lib; 4 | 5 | { 6 | imports = [ 7 | ../../../common/cpu/amd 8 | ../../../common/gpu/amd 9 | ../../../common/pc/laptop 10 | ../../../common/pc/ssd 11 | ]; 12 | 13 | # TSC is unstable 14 | boot.kernelParams = [ "notsc" "trace_clock=local" ]; 15 | 16 | hardware.enableRedistributableFirmware = mkDefault true; 17 | } 18 | -------------------------------------------------------------------------------- /dell/inspiron/7460/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/pc/laptop 6 | ../../../common/pc/ssd 7 | ../../../common/gpu/intel/kaby-lake 8 | ../../../common/gpu/nvidia/maxwell 9 | ../../../common/gpu/nvidia/prime.nix 10 | ]; 11 | 12 | hardware.nvidia.prime = { 13 | intelBusId = "PCI:0:2:0"; 14 | nvidiaBusId = "PCI:1:0:0"; 15 | }; 16 | 17 | services = { 18 | thermald.enable = lib.mkDefault true; 19 | fwupd.enable = lib.mkDefault true; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /dell/inspiron/7559/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/pc/laptop 6 | ../../../common/pc/laptop/hdd 7 | ../../../common/cpu/intel/skylake 8 | ../../../common/gpu/nvidia/maxwell 9 | ../../../common/gpu/nvidia/prime.nix 10 | ]; 11 | 12 | hardware = { 13 | nvidia.prime = { 14 | intelBusId = "PCI:0:2:0"; 15 | nvidiaBusId = "PCI:2:0:0"; 16 | }; 17 | 18 | enableRedistributableFirmware = lib.mkDefault true; 19 | }; 20 | 21 | services = { 22 | thermald.enable = lib.mkDefault true; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /dell/latitude/3340/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /dell/latitude/3480/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # touchpad goes over i2c 11 | boot.blacklistedKernelModules = [ "psmouse" ]; 12 | } 13 | -------------------------------------------------------------------------------- /dell/latitude/5490/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # Important Firmware 11 | hardware.enableRedistributableFirmware = lib.mkDefault true; 12 | 13 | boot = { 14 | # Kernel Panic on suspend fix, taken from ArchLinux wiki. 15 | kernelParams = [ "acpi_enforce_resources=lax" "i915.enable_dc=0" ]; 16 | # Audio Mute LED 17 | extraModprobeConfig = '' 18 | options snd-hda-intel model=mute-led-gpio 19 | ''; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /dell/latitude/5520/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # Essential Firmware 11 | hardware.enableRedistributableFirmware = lib.mkDefault true; 12 | 13 | # Cooling Management 14 | services.thermald.enable = lib.mkDefault true; 15 | 16 | # Enable fwupd 17 | services.fwupd.enable = lib.mkDefault true; 18 | } 19 | -------------------------------------------------------------------------------- /dell/latitude/7280/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /dell/latitude/7390/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /dell/latitude/7420/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/tiger-lake 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /dell/latitude/7430/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | boot.kernelParams = [ 11 | # needed for Intel Iris Xe 12 | "i915.force_probe=46a8" 13 | "i915.enable_guc=3" 14 | "i915.fastboot=1" 15 | # needed for keyboard 16 | "i8042.dumbkbd=1" 17 | "i8042.nopnp=1" 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /dell/latitude/7490/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ]; 8 | 9 | services.thermald.enable = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /dell/latitude/9430/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | boot.kernelParams = [ 11 | # See https://discourse.nixos.org/t/i915-driver-has-bug-for-iris-xe-graphics/25006/12 12 | # jheidbrink reports that without this setting there is a very high lag in Sway which makes it unusable 13 | "i915.enable_psr=0" 14 | ]; 15 | 16 | # Make the webcam work (needs Linux >= 6.6): 17 | hardware.ipu6.enable = true; 18 | hardware.ipu6.platform = "ipu6ep"; 19 | } 20 | -------------------------------------------------------------------------------- /dell/latitude/e7240/README.md: -------------------------------------------------------------------------------- 1 | On some kernel versions user ashgillman has experiences suspend issues 2 | (see https://bugzilla.redhat.com/show_bug.cgi?id=1597481). 3 | 4 | Try: 5 | 6 | ```nix 7 | boot.kernelPackages = pkgs.linuxPackages_4_14; 8 | ``` 9 | -------------------------------------------------------------------------------- /dell/latitude/e7240/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc/laptop 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /dell/optiplex/3050/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc 5 | ../../../common/pc/ssd 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /dell/poweredge/README.md: -------------------------------------------------------------------------------- 1 | [Dell Poweredge R7515](https://www.dell.com/en-us/work/shop/productdetailstxn/poweredge-r7515#techspecs_section) 2 | 3 | ## Install bios update via UEFI 4 | 5 | UEFI updates cannot be updated via the iDrac since it only supports BIOS 6 | firmware files. If you use systemd boot you can however download the EFI 7 | firmware file and put it in `/boot/EFI/Dell/bios-update.efi`. 8 | 9 | Also write the following efi boot entry file as 10 | `/boot/loader/entries/z-efi-update.conf`: 11 | 12 | ``` 13 | title EFI update 14 | efi /efi/Dell/bios-update.efi 15 | ``` 16 | -------------------------------------------------------------------------------- /dell/poweredge/r7515/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/amd 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /dell/precision/3490/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel/meteor-lake 4 | ../../../common/gpu/nvidia/ada-lovelace 5 | ../../../common/pc/laptop 6 | ]; 7 | 8 | boot.initrd.availableKernelModules = [ 9 | "nvme" 10 | "sd_mod" 11 | "thunderbolt" 12 | "usb_storage" 13 | "vmd" 14 | "xhci_pci" 15 | ]; 16 | 17 | hardware.nvidia.prime = { 18 | intelBusId = "PCI:0:2:0"; 19 | nvidiaBusId = "PCI:1:0:0"; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /dell/precision/3541/intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../../common/cpu/intel 4 | ../../../../common/pc/laptop 5 | ../../../../common/gpu/nvidia/disable.nix 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /dell/precision/5490/README.md: -------------------------------------------------------------------------------- 1 | # Dell Precision 5490 2 | 3 | Linux kernel versions prior to 6.7 may not function correctly with the internal monitor, as official support was introduced in version 6.7 (https://www.phoronix.com/news/Linux-6.7-Intel-Meteor-Lake-Gfx). You can enable experimental support by adding the following parameter: 4 | 5 | ``` 6 | boot.kernelParams = [ "i915.force_probe=7d55" ]; 7 | ``` 8 | 9 | However, this may lead to some screen tearing. 10 | 11 | If possible, you might benefit from a newer kernel, for example: 12 | ``` 13 | boot.kernelPackages = pkgs.linuxPackages_latest; 14 | ``` 15 | as it seems to work without any issues. 16 | -------------------------------------------------------------------------------- /dell/precision/5490/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | { 3 | imports = [ 4 | ../../../common/gpu/nvidia/ada-lovelace 5 | ]; 6 | 7 | boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.7") [ "i915.force_probe=7d55" ]; 8 | 9 | hardware.nvidia.prime = { 10 | intelBusId = "PCI:0:2:0"; 11 | nvidiaBusId = "PCI:1:0:0"; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /dell/precision/5560/README.md: -------------------------------------------------------------------------------- 1 | ## Dell Precision 5560 2 | 3 | - Intel i7-11800H 4 | - 00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a60] (rev 01) 5 | - 01:00.0 3D controller [0302]: NVIDIA Corporation TU117GLM [T1200 Laptop GPU] [10de:1fbc] (rev a1) 6 | 7 | If you want to use the new Intel Xe driver, add this to your config: 8 | ```nix 9 | boot.extraModprobeConfig = '' 10 | options xe force_probe=9a60 11 | options i915 force_probe=!9a60 12 | ''; 13 | ``` 14 | 15 | And you should decide what you want to do with the NVIDIA GPU, either sync or offload. 16 | 17 | Fwupd works, you can update the BIOS and DBX. 18 | -------------------------------------------------------------------------------- /dell/precision/5560/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../../common/pc/laptop 5 | ../../../common/pc/ssd 6 | ../../../common/cpu/intel/tiger-lake 7 | ../../../common/gpu/nvidia/turing 8 | ]; 9 | 10 | hardware.enableRedistributableFirmware = lib.mkDefault true; 11 | 12 | services.fwupd.enable = true; 13 | 14 | hardware.nvidia.prime = { 15 | intelBusId = "PCI:0:2:0"; 16 | nvidiaBusId = "PCI:1:0:0"; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /dell/xps/13-7390/README.wiki: -------------------------------------------------------------------------------- 1 | = Dell XPS 13 7390 = 2 | 3 | == Installation == 4 | 5 | You need to disable RAID and use AHCI instead as described [https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1 here]. 6 | 7 | == Known Issues == 8 | 9 | If your BIOS version is greater than or equal to 1.0.13, you may need to add 10 | 11 | 12 | systemd.sleep.extraConfig = "SuspendState=freeze"; 13 | 14 | 15 | to your configuration.nix if you cannot wake from "Sleep". See reference [https://askubuntu.com/a/1194128 here]. 16 | 17 | == Firmware upgrades == 18 | 19 | Note that this device is supported by [https://fwupd.org/ fwupd]. 20 | To perform updates, simply use fwupdmgr. 21 | -------------------------------------------------------------------------------- /dell/xps/13-7390/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | boot.kernelParams = [ "mem_sleep_default=deep" ]; 11 | 12 | # older version break wifi: 13 | # - https://github.com/NixOS/nixos-hardware/issues/173 14 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest; 15 | 16 | # Cooling management 17 | services.thermald.enable = lib.mkDefault true; 18 | 19 | # Allows for updating firmware via `fwupdmgr`. 20 | services.fwupd.enable = lib.mkDefault true; 21 | } 22 | -------------------------------------------------------------------------------- /dell/xps/13-9300/README.wiki: -------------------------------------------------------------------------------- 1 | = Dell XPS 13 9300 = 2 | 3 | == Firmware upgrades == 4 | 5 | Note that this device is supported by [https://fwupd.org/ fwupd]. 6 | To perform firmware upgrades just activate the service 7 | 8 | 9 | services.fwupd.enable = true; 10 | 11 | 12 | Then use fwupdmgr to perform updates. 13 | 14 | == Battery drain when sleeping == 15 | 16 | The laptop uses the S2 sleep mode by default instead of S3, which leads to 17 | draining a lot of battery during sleep. 18 | 19 | See https://wiki.archlinux.org/index.php/Dell_XPS_13_(9300)#Power_Management 20 | and https://bugzilla.kernel.org/show_bug.cgi?id=199689#c3 for reference 21 | -------------------------------------------------------------------------------- /dell/xps/13-9315/README.wiki: -------------------------------------------------------------------------------- 1 | = Dell XPS 13 9315 = 2 | 3 | See also 4 | 5 | == Firmware upgrades == 6 | 7 | Note that this device is supported by [https://fwupd.org/ fwupd]. 8 | To perform firmware upgrades just activate the service 9 | 10 | 11 | services.fwupd.enable = true; 12 | 13 | 14 | Then use fwupdmgr to perform updates. 15 | 16 | == Additional resources == 17 | 18 | * Arch linux wiki: [https://wiki.archlinux.org/title/Dell_XPS_13_(9315) Dell XPS 13 9315] 19 | -------------------------------------------------------------------------------- /dell/xps/13-9333/README.wiki: -------------------------------------------------------------------------------- 1 | = Dell XPS 13 9300 = 2 | 3 | == SSD == 4 | 5 | In the default.nix file, I imported 6 | ../../../common/pc/ssd because my laptop has currently an SSD, but 7 | I'm not sure if it was the case when I bought it or if I installed it later. 8 | 9 | The main updates allow the touchpad to work. 10 | -------------------------------------------------------------------------------- /dell/xps/13-9333/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc/laptop 5 | ../../../common/pc/ssd 6 | ]; 7 | 8 | # Required to allow the touchpad to work 9 | boot.kernelParams = [ "i8042.nopnp=1" ]; 10 | boot.blacklistedKernelModules = [ "i2c_hid" "i2c_hid_acpi" ]; 11 | boot.kernelModules = [ "synaptics_i2c"]; 12 | } 13 | -------------------------------------------------------------------------------- /dell/xps/13-9343/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | services = { 11 | fwupd.enable = lib.mkDefault true; 12 | thermald.enable = lib.mkDefault true; 13 | }; 14 | 15 | boot = { 16 | # needs to be explicitly loaded or else bluetooth/wifi won't work 17 | kernelModules = [ "kvm-intel" "wl" ]; 18 | extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /dell/xps/13-9350/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/lunar-lake 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # The touchpad uses I²C, so PS/2 is unnecessary 11 | boot.blacklistedKernelModules = [ "psmouse" ]; 12 | 13 | # Recommended in NixOS/nixos-hardware#127 14 | services.thermald.enable = lib.mkDefault true; 15 | } 16 | -------------------------------------------------------------------------------- /dell/xps/13-9360/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel/kaby-lake 4 | ../../../common/pc/laptop 5 | ]; 6 | 7 | boot.blacklistedKernelModules = [ "psmouse" ]; # touchpad goes over i2c 8 | 9 | # This will save you money and possibly your life! 10 | services.thermald.enable = true; 11 | } 12 | -------------------------------------------------------------------------------- /dell/xps/13-9370/README.wiki: -------------------------------------------------------------------------------- 1 | = Dell XPS 13 9370 = 2 | 3 | == Battery drain when sleeping == 4 | 5 | The laptop uses the S2 sleep mode by default instead of S3, which leads to 6 | draining a lot of battery during sleep. 7 | 8 | Though this is intentional by the manufacturer and might cause lockups when 9 | forced I - @moredread - never had any issues with it. 10 | 11 | See https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)#Power_Management 12 | and https://bugzilla.kernel.org/show_bug.cgi?id=199689#c3 for reference 13 | 14 | == Additional resources == 15 | 16 | * Arch linux wiki: [https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370) Dell XPS 13 9370] 17 | -------------------------------------------------------------------------------- /dell/xps/13-9370/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/kaby-lake 6 | ../../../common/pc/laptop 7 | ]; 8 | 9 | # Force S3 sleep mode. See README.wiki for details. 10 | boot.kernelParams = [ "mem_sleep_default=deep" ]; 11 | 12 | # touchpad goes over i2c 13 | boot.blacklistedKernelModules = [ "psmouse" ]; 14 | 15 | services.throttled.enable = lib.mkDefault true; 16 | 17 | # This will save you money and possibly your life! 18 | services.thermald.enable = true; 19 | } 20 | -------------------------------------------------------------------------------- /dell/xps/13-9380/README.wiki: -------------------------------------------------------------------------------- 1 | = Dell XPS 13 9380 = 2 | 3 | == Firmware upgrades == 4 | 5 | Note that this device is supported by [https://fwupd.org/ fwupd]. 6 | To perform firmware upgrades use fwupdmgr to perform updates. 7 | 8 | == Battery drain when sleeping == 9 | 10 | The laptop uses the S2 sleep mode by default instead of S3, which leads to 11 | draining a lot of battery during sleep. 12 | 13 | See https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)#Power_Management 14 | and https://bugzilla.kernel.org/show_bug.cgi?id=199689#c3 for reference 15 | -------------------------------------------------------------------------------- /dell/xps/13-9380/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc/laptop 5 | ]; 6 | 7 | # Force S3 sleep mode. See README.wiki for details. 8 | boot.kernelParams = [ "mem_sleep_default=deep" ]; 9 | 10 | # touchpad goes over i2c 11 | boot.blacklistedKernelModules = [ "psmouse" ]; 12 | 13 | # Allows for updating firmware via `fwupdmgr`. 14 | services.fwupd.enable = true; 15 | 16 | # This will save you money and possibly your life! 17 | services.thermald.enable = true; 18 | } 19 | -------------------------------------------------------------------------------- /dell/xps/15-7590/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # Force S3 sleep mode. See README.wiki for details. 11 | boot.kernelParams = [ "mem_sleep_default=deep" ]; 12 | 13 | # Earlier font-size setup 14 | console.earlySetup = true; 15 | 16 | # Prevent small EFI partiion from filling up 17 | boot.loader.grub.configurationLimit = 10; 18 | 19 | # Enable firmware updates via `fwupdmgr`. 20 | services.fwupd.enable = lib.mkDefault true; 21 | 22 | # This will save you money and possibly your life! 23 | services.thermald.enable = lib.mkDefault true; 24 | } 25 | -------------------------------------------------------------------------------- /dell/xps/15-7590/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: 2 | { 3 | imports = [ 4 | ../. 5 | ../../../../common/gpu/nvidia/prime.nix 6 | ../../../../common/gpu/nvidia/turing 7 | ]; 8 | 9 | hardware.nvidia = { 10 | powerManagement = { 11 | # Enable NVIDIA power management. 12 | enable = lib.mkDefault true; 13 | 14 | # Enable dynamic power management. 15 | finegrained = lib.mkDefault true; 16 | }; 17 | 18 | prime = { 19 | # Bus ID of the Intel GPU. 20 | intelBusId = lib.mkDefault "PCI:0:2:0"; 21 | 22 | # Bus ID of the NVIDIA GPU. 23 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /dell/xps/15-9500/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../default.nix 5 | ../../../../common/gpu/nvidia/prime.nix 6 | ../../../../common/gpu/nvidia/turing 7 | ]; 8 | 9 | hardware.nvidia.prime = { 10 | # Bus ID of the Intel GPU. 11 | intelBusId = lib.mkDefault "PCI:0:2:0"; 12 | 13 | # Bus ID of the NVIDIA GPU. 14 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /dell/xps/15-9510/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc/laptop 5 | ../../../common/pc/ssd 6 | ]; 7 | 8 | # This will save you money and possibly your life! 9 | services.thermald.enable = lib.mkDefault true; 10 | 11 | # WiFi speed is slow and crashes by default (https://bugzilla.kernel.org/show_bug.cgi?id=213381) 12 | # Tuning based on iwlwifi reference(https://wiki.archlinux.org/title/Network_configuration/Wireless#iwlwifi) 13 | boot.extraModprobeConfig = '' 14 | options iwlwifi 11n_disable=8 15 | ''; 16 | } 17 | -------------------------------------------------------------------------------- /dell/xps/15-9520/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/intel 5 | ../../../common/gpu/intel/alder-lake 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # This will save you money and possibly your life! 11 | services.thermald.enable = lib.mkDefault true; 12 | 13 | # WiFi speed is slow and crashes by default (https://bugzilla.kernel.org/show_bug.cgi?id=213381) 14 | # disable_11ax - required until ax driver support is fixed 15 | # power_save - works well on this card 16 | boot.extraModprobeConfig = '' 17 | options iwlwifi power_save=1 disable_11ax=1 18 | ''; 19 | } 20 | -------------------------------------------------------------------------------- /dell/xps/15-9520/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../default.nix 5 | ../../../../common/gpu/nvidia/prime.nix 6 | ../../../../common/gpu/nvidia/ampere 7 | ]; 8 | 9 | hardware.nvidia.prime = { 10 | # Bus ID of the Intel GPU. 11 | intelBusId = lib.mkDefault "PCI:0:2:0"; 12 | 13 | # Bus ID of the NVIDIA GPU. 14 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /dell/xps/15-9530/README.wiki: -------------------------------------------------------------------------------- 1 | = Dell XPS 15 9530 = 2 | 3 | == Tested Hardware == 4 | 5 | * CPU: 13th Gen Intel(R) Core(TM) i9-13900H 6 | * RAM: 32 GB 7 | * HDD: 1 TiB SSD (NVME) 8 | * Screen: 15" 4k (3456 x 2160) 9 | * Graphics: NVIDIA GeForce RTX 4070 Laptop GPU, with Intel Graphics too. 10 | * Input: Touchscreen and trackpad. 11 | 12 | == Notes == 13 | 14 | == NVIDIA Offload == 15 | 16 | In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` function, for example: 17 | ``` 18 | nvidia-offload `nix-shell -p glxinfo --run 'glxgears'` 19 | ``` 20 | This is a short bash script that sets the proper environment variables and calls your command. 21 | -------------------------------------------------------------------------------- /dell/xps/15-9530/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../default.nix 5 | ../../../../common/gpu/nvidia/prime.nix 6 | ../../../../common/gpu/nvidia/ada-lovelace 7 | ]; 8 | 9 | hardware.nvidia.prime = { 10 | # Bus ID of the Intel GPU. 11 | intelBusId = lib.mkDefault "PCI:0:2:0"; 12 | 13 | # Bus ID of the NVIDIA GPU. 14 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /dell/xps/15-9550/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | # To just use Intel integrated graphics with Intel's open source driver 8 | # ../../../common/gpu/nvidia/disable.nix 9 | ]; 10 | 11 | # TODO: boot loader 12 | boot.loader.systemd-boot.enable = lib.mkDefault true; 13 | boot.loader.efi.canTouchEfiVariables = lib.mkDefault true; 14 | 15 | # This will save you money and possibly your life! 16 | services.thermald.enable = true; 17 | } 18 | -------------------------------------------------------------------------------- /dell/xps/15-9550/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../default.nix 5 | ../../../../common/gpu/nvidia/prime.nix 6 | ../../../../common/gpu/nvidia/maxwell 7 | ]; 8 | 9 | hardware.nvidia.prime = { 10 | # Bus ID of the Intel GPU. 11 | intelBusId = lib.mkDefault "PCI:0:2:0"; 12 | 13 | # Bus ID of the NVIDIA GPU. 14 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /dell/xps/15-9560/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel/kaby-lake 4 | ../../../common/pc/laptop 5 | ./xps-common.nix 6 | ../../../common/gpu/nvidia 7 | ../../../common/gpu/nvidia/pascal 8 | ]; 9 | 10 | hardware.graphics.enable = true; 11 | 12 | hardware.nvidia.modesetting.enable = true; 13 | 14 | hardware.nvidia.prime = { 15 | # integrated 16 | intelBusId = "PCI:0:2:0"; 17 | 18 | # dedicated 19 | nvidiaBusId = "PCI:1:0:0"; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /dell/xps/15-9560/intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../../common/cpu/intel/kaby-lake 4 | ../../../../common/pc/laptop 5 | ../../../../common/gpu/nvidia/disable.nix 6 | ../xps-common.nix 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /dell/xps/15-9560/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../../common/cpu/intel 6 | ../../../../common/gpu/nvidia/prime.nix 7 | ../../../../common/pc/laptop 8 | ../xps-common.nix 9 | ../../../../common/gpu/nvidia/pascal 10 | ]; 11 | 12 | 13 | # This runs only nvidia, great for games or heavy use of render applications 14 | 15 | ##### disable intel, run nvidia only and as default 16 | hardware.nvidia.prime = { 17 | # Bus ID of the Intel GPU. 18 | intelBusId = "PCI:0:2:0"; 19 | 20 | # Bus ID of the NVIDIA GPU. 21 | nvidiaBusId = "PCI:1:0:0"; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /dell/xps/15-9560/xps-common.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | # Solution to rcu_sched freezing 5 | boot.kernelParams = [ "acpi_rev_override" ]; 6 | 7 | # This will save you money and possibly your life! 8 | services.thermald.enable = lib.mkDefault true; 9 | } 10 | -------------------------------------------------------------------------------- /dell/xps/15-9570/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ./shared.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /dell/xps/15-9570/intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../../common/gpu/nvidia/disable.nix 4 | ../shared.nix 5 | ]; 6 | 7 | # Disables the Nvidia GPU, better for battery life 8 | } 9 | -------------------------------------------------------------------------------- /dell/xps/15-9570/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ 4 | ../../../../common/gpu/nvidia/prime.nix 5 | ../../../../common/gpu/nvidia/pascal 6 | ../shared.nix 7 | ]; 8 | 9 | 10 | # This runs only nvidia, great for games or heavy use of render applications 11 | 12 | ##### disable intel, run nvidia only and as default 13 | hardware.nvidia.prime = { 14 | # Bus ID of the Intel GPU. 15 | intelBusId = "PCI:0:2:0"; 16 | 17 | # Bus ID of the NVIDIA GPU. 18 | nvidiaBusId = "PCI:1:0:0"; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /dell/xps/15-9570/shared.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | 4 | imports = [ 5 | ../../../common/cpu/intel/coffee-lake 6 | ../../../common/pc/laptop 7 | ]; 8 | 9 | # Solution to rcu_sched freezing 10 | boot.kernelParams = [ "acpi_rev_override" ]; 11 | 12 | # This will save you money and possibly your life! 13 | # https://github.com/NixOS/nixos-hardware/pull/127 14 | services.thermald.enable = lib.mkDefault true; 15 | 16 | hardware.graphics = { 17 | enable = lib.mkDefault true; 18 | enable32Bit = lib.mkDefault true; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /dell/xps/17-9700/intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../../common/cpu/intel 4 | ../../../../common/pc/laptop 5 | ../../../../common/gpu/nvidia/disable.nix 6 | ../common.nix 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /dell/xps/17-9700/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../../common/cpu/intel 6 | ../../../../common/pc/laptop 7 | ../../../../common/gpu/nvidia/prime.nix 8 | ../../../../common/gpu/nvidia/turing 9 | ../common.nix 10 | ]; 11 | 12 | hardware.nvidia.prime = { 13 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 14 | intelBusId = lib.mkDefault "PCI:0:2:0"; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /dell/xps/17-9710/intel/README.wiki: -------------------------------------------------------------------------------- 1 | ../README.wiki -------------------------------------------------------------------------------- /dell/xps/17-9710/intel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: { 2 | imports = [ 3 | ../../../../common/cpu/intel 4 | ../../../../common/pc/laptop 5 | ../../../../common/pc/ssd 6 | ]; 7 | 8 | # Includes the Wi-Fi and Bluetooth firmware 9 | hardware.enableRedistributableFirmware = true; 10 | 11 | # Requires at least 5.12 for working sound 12 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); 13 | } 14 | -------------------------------------------------------------------------------- /framework/12-inch/13th-gen-intel/README.md: -------------------------------------------------------------------------------- 1 | # [Framework Laptop 12](https://frame.work/laptop12) 2 | 3 | ## Updating Firmware 4 | 5 | First put enable `fwupd` 6 | 7 | ```nix 8 | services.fwupd.enable = true; 9 | ``` 10 | 11 | Then run 12 | 13 | ```sh 14 | $ fwupdmgr update 15 | ``` 16 | 17 | - [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop12.RPL.BIOS.firmware) 18 | -------------------------------------------------------------------------------- /framework/12-inch/13th-gen-intel/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | { 3 | imports = [ 4 | ../common 5 | ../../../common/cpu/intel 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /framework/12-inch/common/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | imports = [ 4 | ../../../common/pc/laptop 5 | ../../../common/pc/ssd 6 | ../../bluetooth.nix 7 | ../../kmod.nix 8 | ../../framework-tool.nix 9 | ]; 10 | 11 | # Fix TRRS headphones missing a mic 12 | # https://github.com/torvalds/linux/commit/7b509910b3ad6d7aacead24c8744de10daf8715d 13 | boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.13.0") '' 14 | options snd-hda-intel model=dell-headset-multi 15 | ''; 16 | 17 | # Needed for desktop environments to detect display orientation 18 | hardware.sensor.iio.enable = lib.mkDefault true; 19 | } 20 | -------------------------------------------------------------------------------- /framework/13-inch/11th-gen-intel/README.md: -------------------------------------------------------------------------------- 1 | # [Framework Laptop 13](https://frame.work/) 2 | 3 | ## Updating Firmware 4 | 5 | First put enable `fwupd` 6 | 7 | ```nix 8 | services.fwupd.enable = true; 9 | ``` 10 | 11 | Then run 12 | 13 | ```sh 14 | $ fwupdmgr update 15 | ``` 16 | 17 | [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) 18 | -------------------------------------------------------------------------------- /framework/13-inch/11th-gen-intel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ...}: { 2 | imports = [ 3 | ../common 4 | ../common/intel.nix 5 | ]; 6 | 7 | # Requires at least 5.16 for working wi-fi and bluetooth. 8 | # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 9 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); 10 | 11 | hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; 12 | } 13 | -------------------------------------------------------------------------------- /framework/13-inch/12th-gen-intel/README.md: -------------------------------------------------------------------------------- 1 | # [Framework Laptop 13](https://frame.work/) 2 | 3 | ## Updating Firmware 4 | 5 | First put enable `fwupd` 6 | 7 | ```nix 8 | services.fwupd.enable = true; 9 | ``` 10 | 11 | Then run 12 | 13 | ```sh 14 | $ fwupdmgr update 15 | ``` 16 | 17 | - [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.ADL.BIOS.firmware) 18 | -------------------------------------------------------------------------------- /framework/13-inch/13th-gen-intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | # Same config as 12th Gen. The chipsets and mainboard are similar enough 4 | # that no separate configuration is needed. 5 | ../12th-gen-intel 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /framework/13-inch/amd-ai-300-series/README.md: -------------------------------------------------------------------------------- 1 | # [Framework Laptop 13](https://frame.work/) 2 | 3 | ## Updating Firmware 4 | 5 | First put enable `fwupd` 6 | 7 | ```nix 8 | services.fwupd.enable = true; 9 | ``` 10 | 11 | Then run 12 | 13 | ```sh 14 | $ fwupdmgr update 15 | ``` 16 | -------------------------------------------------------------------------------- /framework/13-inch/amd-ai-300-series/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../common 6 | ../common/amd.nix 7 | ]; 8 | config.hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; 9 | } 10 | -------------------------------------------------------------------------------- /framework/13-inch/intel-core-ultra-series1/README.md: -------------------------------------------------------------------------------- 1 | # [Framework Laptop 13](https://frame.work/) 2 | 3 | ## Updating Firmware 4 | 5 | First put enable `fwupd` 6 | 7 | ```nix 8 | services.fwupd.enable = true; 9 | ``` 10 | 11 | Then run 12 | 13 | ```sh 14 | $ fwupdmgr update 15 | ``` 16 | -------------------------------------------------------------------------------- /framework/16-inch/7040-amd/README.md: -------------------------------------------------------------------------------- 1 | # [Framework Laptop 16](https://frame.work/) 2 | 3 | ## Updating Firmware 4 | The Framework Laptop 16 uses LVFS, so it can be updated via fwupd; see https://wiki.nixos.org/wiki/Fwupd for details 5 | -------------------------------------------------------------------------------- /framework/16-inch/7040-amd/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../common 6 | ../common/amd.nix 7 | ../../../common/cpu/amd/raphael/igpu.nix 8 | ]; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /framework/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | assertions = [ 3 | { 4 | assertion = false; 5 | message = "Importing framework/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/framework/OLD-BEHAVIOUR-DEPRECATION.md for more details."; 6 | } 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /framework/framework-tool.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | environment.systemPackages = [ pkgs.framework-tool ]; 3 | } 4 | -------------------------------------------------------------------------------- /gigabyte/b550/b550-fix-suspend.nix: -------------------------------------------------------------------------------- 1 | { 2 | # Work around an issue causing the system to unsuspend immediately after suspend 3 | # and/or hang after suspend. 4 | # 5 | # See https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/ /u/Demotay 6 | # 7 | # Most suggestions elsewhere are to disable GPP0 and/or GPP8 using /proc/acpi/wakeup, but that is 8 | # inconvenient because it toggles. This does essentially the same thing using udev, which can set 9 | # the wakeup attribute to a specific value. 10 | services.udev.extraRules = '' 11 | ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1022", ATTR{device}=="0x1483", ATTR{power/wakeup}="disabled" 12 | ''; 13 | } 14 | -------------------------------------------------------------------------------- /gigabyte/b550/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./b550-fix-suspend.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /gigabyte/b650/README.md: -------------------------------------------------------------------------------- 1 | # B650 suspend bug 2 | 3 | Just as the [B550 mainboard](../b550/README.md) series, the B650 series has a 4 | bug where the PC will wakeup immediately after going into suspend. 5 | 6 | ## Affects at least 7 | 8 | - Gigabyte B650M Aorus Elite AX (Rev. 1.3) (BIOS Version F32b) 9 | -------------------------------------------------------------------------------- /gigabyte/b650/b650-fix-suspend.nix: -------------------------------------------------------------------------------- 1 | { 2 | # see https://bbs.archlinux.org/viewtopic.php?pid=2227023 3 | boot.kernelParams = [ 4 | "acpi_osi=\"!Windows 2015\"" 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /gigabyte/b650/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./b650-fix-suspend.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /google/pixelbook/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/pc/laptop 6 | ../../common/pc/ssd 7 | ../../common/cpu/intel/kaby-lake 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /gpd/micropc/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ 4 | ../../common/pc/laptop 5 | ../../common/pc/ssd 6 | ]; 7 | 8 | # Needed to have the keyboard working during the initrd sequence 9 | boot.initrd.availableKernelModules = [ "battery" ]; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /gpd/p2-max/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../common/pc/laptop 4 | ../../common/pc/ssd 5 | ../../common/cpu/intel/kaby-lake 6 | ../../common/hidpi.nix 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /gpd/win-2/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ...}: 2 | { 3 | imports = [ 4 | ../../common/cpu/intel 5 | ../../common/pc/ssd 6 | ]; 7 | 8 | boot.kernelParams = [ 9 | "fbcon=rotate:1" 10 | "video=eDP-1:panel_orientation=right_side_up" 11 | ]; 12 | 13 | services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") 14 | || !config.services.power-profiles-daemon.enable); 15 | 16 | # Required for grub to properly display the boot menu. 17 | boot.loader.grub.gfxmodeEfi = lib.mkDefault "720x1280x32"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /gpd/win-max-2/2023/README.md: -------------------------------------------------------------------------------- 1 | # GPD Win Max 2 2023 2 | 3 | ## Gyro 4 | 5 | The IMU (Bosch BMI260) is incorrectly identified in the BIOS. It's named BMI0160:00 in ACPI table. 6 | 7 | The IMU is on `/dev/i2c-2`, address `0x69`. It's `CHIP_ID` in reg `0x00` is `0x27`, which could determine that it is actually BMI0260: https://chromium.googlesource.com/chromiumos/platform/ec/+/master/driver/accelgyro_bmi260.h#28 8 | -------------------------------------------------------------------------------- /gpd/win-max-2/2023/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ...}: 2 | with lib; 3 | { 4 | imports = [ 5 | ./.. 6 | ../../../common/cpu/amd 7 | ../../../common/cpu/amd/pstate.nix 8 | ../../../common/gpu/amd 9 | ./bmi260 10 | ]; 11 | 12 | hardware.sensor.iio.bmi260.enable = lib.mkDefault true; 13 | 14 | #see README 15 | boot.blacklistedKernelModules = mkIf config.hardware.sensor.iio.bmi260.enable [ "bmi160_spi" "bmi160_i2c" "bmi160_core" ]; 16 | hardware.sensor.iio.enable = mkIf config.hardware.sensor.iio.bmi260.enable true; 17 | } 18 | -------------------------------------------------------------------------------- /gpd/win-mini/2024/README.md: -------------------------------------------------------------------------------- 1 | # GPD Win Mini 2024 2 | -------------------------------------------------------------------------------- /gpd/win-mini/2024/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | with lib; 3 | { 4 | imports = [ 5 | ./.. 6 | ../../../common/cpu/amd 7 | ../../../common/cpu/amd/pstate.nix 8 | ../../../common/gpu/amd 9 | ]; 10 | 11 | hardware.bluetooth.enable = lib.mkDefault true; 12 | } 13 | -------------------------------------------------------------------------------- /gpd/win-mini/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: 7 | with lib; 8 | let 9 | cfg = config.hardware.gpd.ppt; 10 | in 11 | { 12 | imports = [ 13 | ../../common/pc/laptop 14 | ../../common/pc/ssd 15 | ../../common/hidpi.nix 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /hardkernel/odroid-h3/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../common/cpu/intel/jasper-lake 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /hardkernel/odroid-h4/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../common/cpu/intel/alder-lake 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /hp/elitebook/2560p/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | with lib; 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/sandy-bridge 6 | ../../../common/pc 7 | ../../../common/pc/laptop 8 | ../../../common/pc/laptop/hdd 9 | 10 | ./network.nix 11 | ]; 12 | 13 | config = { 14 | services.thermald.enable = mkDefault true; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /hp/elitebook/2560p/network.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | with lib; 3 | { 4 | config = { 5 | # Wifi can't connect if rand mac address is used 6 | networking.networkmanager.settings.device = { 7 | match-device = "driver:iwlwifi"; 8 | wifi.scan-rand-mac-address = "no"; 9 | }; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /hp/elitebook/830/g6/README.md: -------------------------------------------------------------------------------- 1 | # HP Elitebook 830 G6 2 | 3 | ## solved problems 4 | * KDE Plasma 5 (haven't tested others), ~20% of the time freezes at login screen on resume - setting hardare.enableAllFirmware seems to fix 5 | 6 | ## Unsolved Problems 7 | 8 | * sometimes fails to sleep (seems to be an application causing it, so probably not a driver/kernel problem) 9 | -------------------------------------------------------------------------------- /hp/laptop/14s-dq2024nf/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/tiger-lake 6 | ../../../common/pc 7 | ../../../common/pc/laptop 8 | ../../../common/pc/ssd 9 | ]; 10 | 11 | config = { 12 | services.thermald.enable = lib.mkDefault true; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /hp/notebook/14-df0023/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | with lib; 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/sandy-bridge 6 | ../../../common/pc 7 | ../../../common/pc/laptop 8 | ../../../common/pc/laptop/hdd 9 | ]; 10 | 11 | config = { 12 | services.thermald.enable = mkDefault true; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /hp/probook/440G5/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | # https://www.intel.com/content/www/us/en/products/sku/124967/intel-core-i58250u-processor-6m-cache-up-to-3-40-ghz/specifications.html 5 | # this one works: https://nixos.wiki/wiki/Accelerated_Video_Playback 6 | imports = [ 7 | ../../../common/cpu/intel/kaby-lake 8 | ../../../common/pc 9 | ../../../common/pc/laptop 10 | ../../../common/pc/ssd 11 | ]; 12 | 13 | config = { 14 | services.thermald.enable = lib.mkDefault true; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /huawei/machc-wa/README.md: -------------------------------------------------------------------------------- 1 | # Huawei Matebook X Pro (2020) 2 | 3 | This is a very standard device that needs little configuration. The module mainly imports the common modules for its CPU, GPU, SSD etc. and enables ppd for power management. Nvidia prime offload is also enabled. This configuration should work with all Matebook X Pro models from 2020 (MACHC-WA*) other than MACHC-WAH9L as it does not contain the Nvidia GPU. -------------------------------------------------------------------------------- /huawei/machc-wa/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | config, 5 | ... 6 | }: { 7 | imports = [ 8 | ../../common/cpu/intel/comet-lake 9 | ../../common/gpu/nvidia 10 | ../../common/gpu/nvidia/prime.nix 11 | ../../common/hidpi.nix 12 | ../../common/pc/laptop 13 | ../../common/pc/ssd 14 | ]; 15 | 16 | hardware.nvidia = { 17 | modesetting.enable = lib.mkDefault true; 18 | open = lib.mkDefault false; 19 | nvidiaSettings = lib.mkDefault true; 20 | prime = { 21 | intelBusId = "PCI:0:2:0"; 22 | nvidiaBusId = "PCI:1:0:0"; 23 | }; 24 | }; 25 | 26 | services.power-profiles-daemon.enable = lib.mkDefault true; 27 | } 28 | -------------------------------------------------------------------------------- /intel/nuc/8i7beh/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ]; 7 | 8 | services.thermald.enable = lib.mkDefault true; 9 | } 10 | -------------------------------------------------------------------------------- /kobol/helios4/overlay.nix: -------------------------------------------------------------------------------- 1 | final: _prev: { 2 | ubootHelios4 = final.buildUBoot rec { 3 | defconfig = "helios4_defconfig"; 4 | filesToInstall = [ "u-boot-spl.kwb" ]; 5 | # 2021.07 and later are broken, similar to this bug report: 6 | # https://www.mail-archive.com/u-boot@lists.denx.de/msg451013.html# 7 | version = "2021.04"; 8 | src = final.fetchFromGitHub { 9 | owner = "u-boot"; 10 | repo = "u-boot"; 11 | rev = "v${version}"; 12 | sha256 = "sha256-QxrTPcx0n0NWUJ990EuIWyOBtknW/fHDRcrYP0yQzTo="; 13 | }; 14 | patches = []; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /lenovo/ideapad/15ach6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/cpu/amd/pstate.nix 7 | ../../../common/gpu/amd 8 | ../../../common/gpu/nvidia/prime.nix 9 | ../../../common/gpu/nvidia/turing 10 | ../../../common/pc/laptop 11 | ../../../common/pc/ssd 12 | ]; 13 | 14 | hardware.nvidia = { 15 | modesetting.enable = true; 16 | prime = { 17 | amdgpuBusId = "PCI:6:0:0"; 18 | nvidiaBusId = "PCI:1:0:0"; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /lenovo/ideapad/15alc6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/gpu/amd 7 | ../../../common/pc/laptop 8 | ../../../common/pc/ssd 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/ideapad/15arh05/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/turing 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ]; 11 | 12 | # Specify bus id of Nvidia and Intel graphics. 13 | hardware.nvidia.prime = { 14 | amdgpuBusId = "PCI:5:0:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | 18 | # Cooling management 19 | services.thermald.enable = lib.mkDefault true; 20 | 21 | # tlp defaults to "powersave", which doesn't exist on this laptop 22 | services.tlp.settings = { 23 | CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lenovo/ideapad/16ach6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/cpu/amd/pstate.nix 7 | ../../../common/gpu/amd 8 | ../../../common/gpu/nvidia/prime.nix 9 | ../../../common/gpu/nvidia/turing 10 | ../../../common/pc/laptop 11 | ../../../common/pc/ssd 12 | ]; 13 | 14 | hardware.nvidia = { 15 | modesetting.enable = true; 16 | prime = { 17 | amdgpuBusId = "PCI:5:0:0"; 18 | nvidiaBusId = "PCI:1:0:0"; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /lenovo/ideapad/16ahp9/README.md: -------------------------------------------------------------------------------- 1 | # Lenovo Ideapad 2-in-1 2 | 3 | This device supports Conservation mode which charges the battery to 79/80%. See [TLP docs](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series) and [auto-cpu freq](https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#battery-charging-thresholds) to enable it. See specs [here](https://psref.lenovo.com/syspool/Sys/PDF/IdeaPad/IdeaPad_5_2_in_1_16AHP9/IdeaPad_5_2_in_1_16AHP9_Spec.pdf). 4 | 5 | -------------------------------------------------------------------------------- /lenovo/ideapad/16ahp9/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/cpu/amd/pstate.nix 7 | ../../../common/gpu/amd 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/ideapad/16iah8/README.md: -------------------------------------------------------------------------------- 1 | # Lenovo Ideapad Slim 5 16IAH8 2 | 3 | This device supports Conservation mode which charges the battery to 79/80%. See [TLP docs](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series) and [auto-cpu freq](https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#battery-charging-thresholds) to enable it. 4 | 5 | `lspci`: 6 | ``` 7 | 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P GT1 [UHD Graphics] (rev 0c) 8 | ``` 9 | There is no dedicated graphics card. See specs [here](https://psref.lenovo.com/syspool/Sys/PDF/IdeaPad/IdeaPad_Slim_5_16IAH8/IdeaPad_Slim_5_16IAH8_Spec.pdf). 10 | 11 | -------------------------------------------------------------------------------- /lenovo/ideapad/16iah8/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/alder-lake 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/ideapad/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../../common/pc/laptop ]; 3 | } 4 | -------------------------------------------------------------------------------- /lenovo/ideapad/s145-15api/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/amd 4 | ../../../common/gpu/amd 5 | ../../../common/gpu/amd/southern-islands 6 | ]; 7 | 8 | # Blacklist ideapad-laptop because it keeps resetting rfkill devices 9 | boot.blacklistedKernelModules = [ "ideapad-laptop" ]; 10 | 11 | # For some reason we have to specify manually which model we want snd-hda-intel to use 12 | # without it external microphone won't work 13 | boot.extraModprobeConfig = '' 14 | options snd-hda-intel model=alc255-acer,dell-headset-multi 15 | ''; 16 | } 17 | -------------------------------------------------------------------------------- /lenovo/ideapad/slim-5/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/amd 4 | ../../../common/gpu/amd 5 | ../../../common/pc/laptop 6 | ../../../common/pc/ssd 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/ideapad/z510/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ]; 6 | 7 | # https://github.com/NixOS/nixpkgs/issues/18356 8 | boot.blacklistedKernelModules = [ "nouveau" ]; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/legion/15ach6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/amd 5 | ../../../common/gpu/amd 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/ampere 8 | ../../../common/hidpi.nix 9 | ../../../common/pc/laptop 10 | ../../../common/pc/ssd 11 | ]; 12 | 13 | hardware.nvidia.prime = { 14 | amdgpuBusId = "PCI:5:0:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | 18 | services.thermald.enable = lib.mkDefault true; 19 | 20 | # √(3840² + 2160²) px / 15.60 in ≃ 282 dpi 21 | services.xserver.dpi = 282; 22 | } 23 | -------------------------------------------------------------------------------- /lenovo/legion/15ach6h/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ ./hybrid ]; 5 | 6 | specialisation.ddg.configuration = { 7 | # This specialisation is for the case where "DDG" (Dual-Direct GFX, A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. 8 | system.nixos.tags = [ "Dual-Direct-GFX-Mode" ]; 9 | imports = [ ./nvidia ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/legion/15arh05h/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/turing 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ]; 11 | 12 | # Specify bus id of Nvidia and Intel graphics. 13 | hardware.nvidia.prime = { 14 | amdgpuBusId = "PCI:6:0:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | 18 | # Cooling management 19 | services.thermald.enable = lib.mkDefault true; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /lenovo/legion/15ich/README.md: -------------------------------------------------------------------------------- 1 | ## Setup at the time of testing 2 | ``` 3 | $ nix-info -m 4 | - system: `"x86_64-linux"` 5 | - host os: `Linux 5.15.90, NixOS, 22.11 (Raccoon), 22.11.2058.ce20e9ebe19` 6 | - multi-user?: `yes` 7 | - sandbox: `yes` 8 | - version: `nix-env (Nix) 2.11.1` 9 | - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` 10 | ``` 11 | ``` 12 | $ lspci 13 | ... 14 | 00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] 15 | ... 16 | 01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1) 17 | ... 18 | ``` 19 | -------------------------------------------------------------------------------- /lenovo/legion/15ich/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel/coffee-lake 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/pascal 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ../../../common/pc/laptop/hdd 11 | ]; 12 | 13 | hardware = { 14 | nvidia = { 15 | modesetting.enable = lib.mkDefault true; 16 | powerManagement.enable = lib.mkDefault true; 17 | 18 | prime = { 19 | intelBusId = "PCI:0:2:0"; 20 | nvidiaBusId = "PCI:1:0:0"; 21 | }; 22 | }; 23 | }; 24 | 25 | services.thermald.enable = lib.mkDefault true; 26 | } 27 | -------------------------------------------------------------------------------- /lenovo/legion/16ach6h/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ ./hybrid ]; 5 | 6 | specialisation.ddg.configuration = { 7 | # This specialisation is for the case where "DDG" (Dual-Direct GFX, A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. 8 | system.nixos.tags = [ "Dual-Direct-GFX-Mode" ]; 9 | imports = [ ./nvidia ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/legion/16ach6h/edid/16ach6h.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NixOS/nixos-hardware/daa628a725ab4948e0e2b795e8fb6f4c3e289a7a/lenovo/legion/16ach6h/edid/16ach6h.bin -------------------------------------------------------------------------------- /lenovo/legion/16achg6/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { lib, options, ... }: 2 | 3 | { 4 | imports = [ ../hybrid ]; 5 | services.xserver.videoDrivers = [ "nvidia" ]; 6 | hardware = { 7 | nvidia.prime.offload.enable = false; 8 | } // lib.optionalAttrs (options ? amdgpu.opencl.enable) { 9 | # introduced in https://github.com/NixOS/nixpkgs/pull/319865 10 | amdgpu.opencl.enable = lib.mkDefault false; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/legion/16arh7h/README.md: -------------------------------------------------------------------------------- 1 | # Useful Links 2 | 3 | [NixOS Wiki - Nvidia](https://wiki.nixos.org/wiki/NVIDIA) 4 | 5 | -------------------------------------------------------------------------------- /lenovo/legion/16arh7h/igpu-only/default.nix: -------------------------------------------------------------------------------- 1 | # This will enable only the integrated AMD GPU, while disabling the dedicated Nvidia GPU 2 | {...}: { 3 | imports = [ 4 | ../../../../common/cpu/amd 5 | ../../../../common/cpu/amd/pstate.nix 6 | ../../../../common/gpu/amd 7 | ../../../../common/gpu/nvidia/disable.nix 8 | ../../../../common/pc/laptop 9 | ../../../../common/pc/ssd 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/legion/16arha7/README.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | 3 | This configuration includes a fix to get the speakers working on kernels earlier than 6.9.0. Kernels after 6.9.0 already have this patch built-in. 4 | 5 | ## Setup at the time of testing 6 | ``` 7 | $ nix-info -m 8 | - system: `"x86_64-linux"` 9 | - host os: `Linux 6.8.2-zen2, NixOS, 24.05 (Uakari), 24.05.20240403.fd281bd` 10 | - multi-user?: `yes` 11 | - sandbox: `yes` 12 | - version: `nix-env (Nix) 2.18.2` 13 | - channels(root): `""` 14 | - nixpkgs: `/home/aires/.nix-defexpr/channels/nixpkgs` 15 | ``` 16 | -------------------------------------------------------------------------------- /lenovo/legion/16ithg6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/gpu/nvidia/prime.nix 7 | ../../../common/gpu/nvidia/ampere 8 | ../../../common/pc/laptop 9 | ../../../common/pc/ssd 10 | ../../../common/hidpi.nix 11 | ]; 12 | 13 | # Specify bus id of Nvidia and Intel graphics. 14 | hardware.nvidia.prime = { 15 | intelBusId = "PCI:00:02:0"; 16 | nvidiaBusId = "PCI:01:00:0"; 17 | }; 18 | 19 | # Cooling management 20 | services.thermald.enable = lib.mkDefault true; 21 | 22 | # √(2560² + 1600²) px / 16 in ≃ 189 dpi 23 | services.xserver.dpi = 189; 24 | } 25 | -------------------------------------------------------------------------------- /lenovo/legion/t526amr5/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NixOS/nixos-hardware/daa628a725ab4948e0e2b795e8fb6f4c3e289a7a/lenovo/legion/t526amr5/README.md -------------------------------------------------------------------------------- /lenovo/legion/t526amr5/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/amd 6 | ../../../common/gpu/nvidia 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # TPM2 module 11 | security.tpm2.enable = true; 12 | 13 | # Device could have multiple architectures, but they all support open 14 | hardware.nvidia.open = true; 15 | } 16 | -------------------------------------------------------------------------------- /lenovo/thinkpad/a475/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ 4 | ../../../common/gpu/amd 5 | ../../../common/cpu/amd 6 | ../../../common/cpu/amd/pstate.nix 7 | ../../../common/pc/ssd 8 | ../../../common/pc/laptop/hdd 9 | #../../../common/hidpi.nix #hidpi 10 | ../. 11 | ]; 12 | 13 | boot.kernelParams = [ "i8042.nomux=1" "i8042.reset" ]; # Fix trackpoint and touchpad working only after reboot 14 | } 15 | 16 | -------------------------------------------------------------------------------- /lenovo/thinkpad/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ ../../common/pc/laptop ]; 5 | 6 | hardware.trackpoint.enable = lib.mkDefault true; 7 | hardware.trackpoint.emulateWheel = lib.mkDefault config.hardware.trackpoint.enable; 8 | 9 | # Fingerprint reader: login and unlock with fingerprint (if you add one with `fprintd-enroll`) 10 | # services.fprintd.enable = true; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e14/amd/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../../common/cpu/amd 5 | ../../../../common/gpu/amd 6 | ]; 7 | 8 | boot.kernelParams = [ 9 | # With BIOS version 1.12 and the IOMMU enabled, the amdgpu driver 10 | # either crashes or is not able to attach to the GPU depending on 11 | # the kernel version. I've seen no issues with the IOMMU disabled. 12 | # 13 | # BIOS version 1.13 fixes the IOMMU issues, but we leave the IOMMU 14 | # in software mode to avoid a sad experience for those people that drew 15 | # the short straw when they bought their laptop. 16 | "iommu=soft" 17 | ]; 18 | } 19 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e14/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/pc/ssd 7 | ]; 8 | 9 | boot.kernelParams = [ 10 | # Force use of the thinkpad_acpi driver for backlight control. 11 | # This allows the backlight save/load systemd service to work. 12 | "acpi_backlight=native" 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e14/intel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../common/cpu/intel/comet-lake 7 | ]; 8 | 9 | services.throttled.enable = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e14/intel/gen4/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../. 6 | ../../../../../common/cpu/intel/alder-lake 7 | ]; 8 | 9 | services.throttled.enable = lib.mkDefault false; 10 | hardware.intelgpu.driver = "xe"; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e14/intel/gen6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../. 6 | ../../../../../common/cpu/intel/meteor-lake 7 | ]; 8 | 9 | services.throttled.enable = lib.mkDefault false; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e15/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | boot.kernelParams = [ 11 | # Force use of the thinkpad_acpi driver for backlight control. 12 | # This allows the backlight save/load systemd service to work. 13 | "acpi_backlight=native" 14 | ]; 15 | } 16 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e15/intel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../common/cpu/intel/alder-lake 7 | ]; 8 | 9 | services.throttled.enable = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e470/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/intel/kaby-lake 7 | ../../../common/gpu/nvidia/prime.nix 8 | ../../../common/gpu/nvidia/maxwell 9 | ]; 10 | 11 | hardware.nvidia.prime = { 12 | # Bus ID of the Intel GPU. 13 | intelBusId = lib.mkDefault "PCI:0:2:0"; 14 | 15 | # Bus ID of the NVIDIA GPU. 16 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 17 | }; 18 | 19 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest; 20 | } 21 | -------------------------------------------------------------------------------- /lenovo/thinkpad/e495/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/amd 7 | ]; 8 | 9 | # see https://github.com/NixOS/nixpkgs/issues/69289 10 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; 11 | 12 | boot.kernelParams = [ 13 | # Force use of the thinkpad_acpi driver for backlight control. 14 | # This allows the backlight save/load systemd service to work. 15 | "acpi_backlight=native" 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /lenovo/thinkpad/l13/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/intel 5 | ../../../common/pc/ssd 6 | ../. 7 | ]; 8 | 9 | services.throttled.enable = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/l13/yoga/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../yoga.nix 6 | ]; 7 | 8 | services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/l14/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/pc/ssd 5 | ]; 6 | 7 | boot.kernelParams = [ 8 | # Force use of the thinkpad_acpi driver for backlight control. 9 | # This allows the backlight save/load systemd service to work. 10 | "acpi_backlight=native" 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/l14/intel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../common/cpu/intel 7 | ]; 8 | 9 | services.throttled.enable = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/l480/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../../common/cpu/intel/kaby-lake 6 | ../../../common/pc/ssd 7 | ]; 8 | 9 | # available cpufreq governors: performance powersave 10 | # The powersave mode locks the cpu to 700Mhz which is not really usable 11 | powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p1/3th-gen/audio.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | # This can be removed when the default kernel is at least version 5.11 due to sof module 4 | boot.kernelPackages = lib.mkIf 5 | (lib.versionOlder pkgs.linux.version "5.11") 6 | (lib.mkDefault pkgs.linuxPackages_latest); 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p1/3th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ./audio.nix 5 | ./nvidia.nix 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p1/3th-gen/nvidia.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../../../common/gpu/24.05-compat.nix 5 | ]; 6 | hardware = { 7 | graphics = { 8 | enable = lib.mkDefault true; 9 | enable32Bit = lib.mkDefault true; 10 | }; 11 | nvidia = { 12 | modesetting.enable = lib.mkDefault true; 13 | prime = { 14 | # Bus ID of the Intel GPU. 15 | intelBusId = lib.mkDefault "PCI:0:2:0"; 16 | # Bus ID of the NVIDIA GPU. 17 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 18 | }; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p1/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | # might need nvidia module but we don't know the PCI ids: 5 | # https://github.com/NixOS/nixos-hardware/pull/274#discussion_r650483740 6 | #../../../common/gpu/nvidia/prime.nix 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | # Need to set Thunderbolt to "BIOS Assist Mode" 11 | # https://forums.lenovo.com/t5/Other-Linux-Discussions/T480-CPU-temperature-and-fan-speed-under-linux/m-p/4114832 12 | boot.kernelParams = [ "acpi_backlight=native" ]; 13 | 14 | # Emulate mouse wheel on trackpoint 15 | # hardware.trackpoint.emulateWheel = true; 16 | 17 | services.fprintd.enable = true; 18 | } 19 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p14s/amd/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../common/cpu/amd 7 | ../../../../common/gpu/amd 8 | ]; 9 | 10 | # For support of newer AMD GPUs, backlight and internal microphone 11 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p14s/amd/gen1/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p14s/amd/gen3/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../../common/cpu/amd/pstate.nix 7 | ]; 8 | 9 | # For the Qualcomm NFA-725A (Device 1103) wireless network controller 10 | # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 11 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p14s/amd/gen4/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, config, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../../../../common/cpu/amd/pstate.nix 6 | ]; 7 | 8 | # For the Qualcomm NFA765 [17cb:1103] wireless network controller 9 | # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 10 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p14s/intel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../common/cpu/intel 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p14s/intel/gen3/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../../common/gpu/nvidia/prime.nix 7 | ../../../../../common/gpu/nvidia/turing 8 | ]; 9 | 10 | hardware = { 11 | intelgpu.driver = "xe"; 12 | 13 | nvidia.prime = { 14 | intelBusId = "PCI:0:2:0"; 15 | nvidiaBusId = "PCI:3:0:0"; 16 | }; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p14s/intel/gen5/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../../common/gpu/nvidia/prime.nix 7 | ../../../../../common/gpu/nvidia/turing 8 | ]; 9 | 10 | hardware = { 11 | intelgpu.driver = "i915"; #xe driver may be used on newer kernels 12 | nvidia = { 13 | prime = { 14 | intelBusId = "PCI:0:2:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | }; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p16s/amd/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../../common/cpu/amd 5 | ../../../../common/gpu/amd 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p16s/amd/gen1/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | # For mainline support of rtw89 wireless networking 5 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p16s/amd/gen2/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p16s/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/pc/ssd 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p16s/intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p16s/intel/gen2/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: { 2 | imports = [ 3 | ../. 4 | ../../../../../common/cpu/intel/raptor-lake 5 | ../../../../../common/gpu/intel/raptor-lake 6 | ../../../../../common/gpu/nvidia/ampere 7 | ../../../../../common/gpu/nvidia/prime.nix 8 | ]; 9 | 10 | # DOCS https://wiki.nixos.org/wiki/NVIDIA#Offload_mode 11 | hardware.nvidia.prime = { 12 | intelBusId = lib.mkDefault "PCI:0:2:0"; 13 | nvidiaBusId = lib.mkDefault "PCI:3:0:0"; 14 | }; 15 | 16 | # HACK https://github.com/NVIDIA/open-gpu-kernel-modules/issues/472 17 | hardware.nvidia.open = lib.mkOverride 993 false; 18 | } 19 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p43s/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel/whiskey-lake 5 | ../../../common/pc/ssd 6 | ../../../common/gpu/nvidia/pascal 7 | ../../../common/gpu/nvidia/prime-sync.nix 8 | ]; 9 | 10 | hardware = { 11 | graphics.enable = lib.mkDefault true; 12 | 13 | nvidia = { 14 | prime = { 15 | intelBusId = lib.mkDefault "PCI:0:2:0"; 16 | nvidiaBusId = lib.mkDefault "PCI:60:0:0"; 17 | }; 18 | 19 | powerManagement.enable = lib.mkDefault config.hardware.nvidia.prime.sync.enable; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /lenovo/thinkpad/p53/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/intel 5 | ../. 6 | ]; 7 | 8 | services.throttled.enable = lib.mkDefault true; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14/amd/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../common/cpu/amd 7 | ../../../../common/gpu/amd 8 | ]; 9 | 10 | # For support of newer AMD GPUs, backlight and internal microphone 11 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14/amd/gen1/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14/amd/gen2/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../../common/cpu/amd/pstate.nix 7 | ]; 8 | 9 | # For support of MEDIATEK Corp. Device 7961 wireless network controller, see https://lwn.net/Articles/843303/ 10 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") pkgs.linuxPackages_latest; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14/amd/gen3/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../../common/cpu/amd/pstate.nix 7 | ]; 8 | 9 | # For the Qualcomm NFA-725A (Device 1103) wireless network controller 10 | # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 11 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14/amd/gen4/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, config, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../../common/cpu/amd/pstate.nix 7 | ]; 8 | 9 | # For the Qualcomm NFA765 [17cb:1103] wireless network controller 10 | # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 11 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14/amd/gen5/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, config, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../../common/cpu/amd/pstate.nix 7 | ]; 8 | 9 | # Embedded controller wake-ups drain battery in s2idle on this device 10 | # See https://lore.kernel.org/all/ZnFYpWHJ5Ml724Nv@ohnotp/ 11 | boot.kernelParams = [ "acpi.ec_no_wakeup=1" ]; 12 | 13 | # For the Qualcomm NFA765 [17cb:1103] wireless network controller 14 | # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 15 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; 16 | } 17 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14s/amd/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../../common/cpu/amd 7 | ../../../../common/gpu/amd 8 | ]; 9 | 10 | # For support of newer AMD GPUs, backlight and internal microphone 11 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14s/amd/gen1/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ]; 6 | 7 | # For mainline support of rtw89 wireless networking 8 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; 9 | 10 | # Enable energy savings during sleep 11 | boot.kernelParams = [ "mem_sleep_default=deep" ]; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t14s/amd/gen4/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ]; 6 | 7 | # Fix laptop not properly powering off during shutdown. 8 | boot.kernelParams = [ "apm=power_off" ]; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t420/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../tp-smapi.nix 5 | ../../../common/cpu/intel/sandy-bridge 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t430/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ]; 6 | 7 | boot = { 8 | kernelParams = [ 9 | # fixes brightness keys, see https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T430s 10 | ''acpi_osi="!Windows 2012"'' 11 | ]; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t440p/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ]; 6 | 7 | boot = { 8 | extraModprobeConfig = '' 9 | options bbswitch use_acpi_to_detect_card_state=1 10 | options thinkpad_acpi force_load=1 fan_control=1 11 | ''; 12 | # TODO: probably enable tcsd? Is this line necessary? 13 | kernelModules = [ "tpm-rng" ]; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t440s/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ]; 6 | 7 | boot = { 8 | # TODO: probably enable tcsd? Is this line necessary? 9 | kernelModules = [ "tpm-rng" ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t450s/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../. 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t460/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../. 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t460p/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../. 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t460s/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../. 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t470s/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../. 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t480/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/ssd 7 | ../. 8 | ]; 9 | 10 | services.throttled.enable = lib.mkDefault true; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t480s/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../../../common/pc/ssd 7 | ../. 8 | ]; 9 | 10 | services.throttled.enable = lib.mkDefault true; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t490s/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc/ssd 5 | ../. 6 | ]; 7 | 8 | services.throttled.enable = lib.mkDefault true; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t495/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/amd 7 | ]; 8 | 9 | # Force use of the thinkpad_acpi driver for backlight control. 10 | # This allows the backlight save/load systemd service to work. 11 | boot.kernelParams = [ "acpi_backlight=native" ]; 12 | 13 | # see https://github.com/NixOS/nixpkgs/issues/69289 14 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; 15 | } 16 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t520/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../tp-smapi.nix 5 | ../../../common/cpu/intel/sandy-bridge 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t550/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../. 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/t590/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/cpu/intel 6 | ../. 7 | ]; 8 | 9 | services = { 10 | throttled.enable = lib.mkDefault true; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/tp-smapi.nix: -------------------------------------------------------------------------------- 1 | # tp_smapi works on ThinkPads made before 2013. See compat table: 2 | # https://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status 3 | 4 | { config, ... }: 5 | 6 | { 7 | boot = { 8 | kernelModules = [ "tp_smapi" ]; 9 | extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/w520/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../tp-smapi.nix 5 | ../../../common/cpu/intel/sandy-bridge 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1-extreme/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ../../../common/pc/ssd 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1-extreme/gen3/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ]; 7 | 8 | # New ThinkPads have a different TrackPoint manufacturer/name. 9 | hardware.trackpoint.device = "TPPS/2 Elan TrackPoint"; 10 | 11 | # Fix clickpad (clicking by depressing the touchpad). 12 | boot.kernelParams = [ "psmouse.synaptics_intertouch=0" ]; 13 | 14 | # Set the right DPI. xdpyinfo says the screen is 677x423 mm but 15 | # it actually is 344×215 mm. 16 | services.xserver.monitorSection = lib.mkDefault '' 17 | DisplaySize 344 215 18 | ''; 19 | } 20 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1-extreme/gen4/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ]; 7 | 8 | # New ThinkPads have a different TrackPoint manufacturer/name. 9 | hardware.trackpoint.device = "TPPS/2 Elan TrackPoint"; 10 | 11 | # Set the right DPI. xdpyinfo says the screen is 677x423 mm but 12 | # it actually is 344×215 mm. 13 | services.xserver.monitorSection = lib.mkDefault '' 14 | DisplaySize 344 215 15 | ''; 16 | } 17 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1-nano/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | # Reference to hardware: https://ubuntu.com/certified/202012-28574 3 | imports = [ 4 | ../. 5 | ../../../common/cpu/intel 6 | ../../../common/pc/ssd 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1-nano/gen1/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ ../. ]; 5 | 6 | environment.systemPackages = with pkgs; [ 7 | alsa-utils 8 | ]; 9 | 10 | systemd.services.x1-fix = { 11 | description = "Use alsa-utils to fix sound interference on Thinkpad x1 Nano"; 12 | serviceConfig = { 13 | Type = "simple"; 14 | ExecStart = "${pkgs.alsa-tools}/bin/hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0"; 15 | Restart = "on-failure"; 16 | }; 17 | wantedBy = [ "default.target" ]; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/10th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../../common/pc/ssd 5 | ]; 6 | 7 | # Use the right Intel graphics driver 8 | boot.kernelParams = [ "i915.force_probe=46a6" ]; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/11th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../../common/pc/ssd 5 | ]; 6 | 7 | # Use the right Intel graphics driver 8 | boot.kernelParams = [ "i915.force_probe=a7a1" ]; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/12th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../../common/pc/ssd 5 | ]; 6 | 7 | hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint"; 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/13th-gen/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: 2 | 3 | { 4 | imports = [ 5 | ../../../../common/pc/ssd 6 | ../../../../common/cpu/intel/lunar-lake 7 | ]; 8 | 9 | hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint"; 10 | 11 | services.thermald.enable = lib.mkDefault true; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/2nd-gen/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../../../common/cpu/intel/haswell 6 | ../../../../common/pc/ssd 7 | ]; 8 | 9 | services.throttled.enable = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/7th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../../../common/pc/ssd 6 | ]; 7 | 8 | services.throttled.enable = lib.mkDefault true; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/9th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../../../common/pc/ssd 6 | ]; 7 | 8 | # This solves lagging noticeable on high-resolution screens. 9 | boot.kernelPackages = lib.mkIf 10 | (lib.versionOlder pkgs.linux.version "5.15") 11 | (lib.mkDefault pkgs.linuxPackages_latest); 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/yoga/7th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: { 2 | imports = [ 3 | ../. 4 | ../../../../../common/pc/ssd 5 | ]; 6 | 7 | # At least kernel 5.19 is required for the system to work properly. 8 | boot.kernelPackages = lib.mkIf 9 | (lib.versionOlder pkgs.linux.version "5.19") 10 | (lib.mkDefault pkgs.linuxPackages_latest); 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/yoga/8th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../../../common/pc/ssd 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x1/yoga/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: { 2 | imports = [ 3 | ../. 4 | ../../yoga.nix 5 | ]; 6 | 7 | services = { 8 | fprintd.enable = lib.mkDefault true; 9 | fwupd.enable = lib.mkDefault true; 10 | xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13-yoga/default.nix: -------------------------------------------------------------------------------- 1 | ../x13/yoga/default.nix -------------------------------------------------------------------------------- /lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md: -------------------------------------------------------------------------------- 1 | # Thinkpad X13 Deprecations 2 | 3 | ## Overview 4 | 5 | The X13 has multiple variants. Originally, the configs only supported Intel 6 | hardware. 7 | 8 | ## How to update 9 | 10 | If you previously imported the module under `lenovo/thinkpad/x13`, you can now 11 | import `lenovo/thinkpad/x13/intel` instead. Users with the AMD variant should 12 | import `lenovo/thinkpad/x13/amd`. 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13/amd/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | imports = [ 3 | ../common.nix 4 | ../../../../common/cpu/amd 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13/common.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | imports = [ 3 | ../. 4 | ../../../common/pc/ssd 5 | ]; 6 | 7 | # Somehow psmouse does not load automatically on boot for me 8 | boot.initrd.kernelModules = [ "psmouse" ]; 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | assertions = [ 3 | { 4 | assertion = false; 5 | message = "Importing the x13/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md for more details."; 6 | } 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13/intel/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | # Reference to hardware: https://certification.ubuntu.com/hardware/202004-27844 3 | imports = [ 4 | ../common.nix 5 | ../../../../common/cpu/intel 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13/yoga/3th-gen/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: { 2 | imports = [ 3 | ../. 4 | ]; 5 | 6 | # without throttled, our CPU (i5-1235u) did not boost beyond 1300MHz 7 | services.throttled.enable = lib.mkDefault true; 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13/yoga/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: { 2 | imports = [ 3 | ../intel 4 | ../../yoga.nix 5 | ]; 6 | 7 | services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; 8 | 9 | services.hardware.bolt.enable = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x13s/README.md: -------------------------------------------------------------------------------- 1 | # Lenovo X13s 2 | 3 | [Debian](https://wiki.debian.org/InstallingDebianOn/Thinkpad/X13s) 4 | [PostmarketOS](https://wiki.postmarketos.org/wiki/Lenovo_ThinkPad_X13s_(lenovo-21bx)) 5 | 6 | ## Camera 7 | The MIPI camera does work, however, it's not accelerated by the ISP and therefore image processing is done on CPU. 8 | 9 | ## Wifi and Bluetooth MAC addresses 10 | Currently they need to be set manually 11 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x140e/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/amd 7 | ]; 8 | 9 | boot.extraModprobeConfig = lib.mkDefault '' 10 | options snd_hda_intel enable=0,1 11 | ''; 12 | 13 | services.xserver.videoDrivers = [ "ati" ]; 14 | } 15 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x200s/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/pc/laptop/hdd 5 | ../tp-smapi.nix 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x220/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel/sandy-bridge 5 | ../../../common/pc/laptop/hdd # TODO: reverse compat 6 | ../tp-smapi.nix 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x230/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/intel 7 | ../../../common/pc/laptop 8 | ]; 9 | 10 | boot = { 11 | kernelModules = [ 12 | "tpm-rng" 13 | ]; 14 | }; 15 | 16 | services.xserver.deviceSection = lib.mkDefault '' 17 | Option "TearFree" "true" 18 | ''; 19 | } 20 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x250/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x260/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ]; 6 | 7 | boot.kernelParams = [ 8 | # https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X260#Thinkpad_X260 9 | "i915.enable_psr=0" 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x270/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../common/cpu/intel 5 | ../../../common/pc/ssd 6 | ]; 7 | 8 | boot.kernelParams = [ 9 | # Disable "Panel Self Refresh". Fix random freezes. 10 | "i915.enable_psr=0" 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x280/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/intel 7 | ../../../common/pc/ssd/default.nix 8 | ]; 9 | 10 | services.throttled.enable = lib.mkDefault true; 11 | } 12 | -------------------------------------------------------------------------------- /lenovo/thinkpad/x390/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../. 6 | ../../../common/cpu/intel 7 | ../../../common/pc/ssd/default.nix 8 | ]; 9 | 10 | services.throttled.enable = lib.mkDefault true; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /lenovo/thinkpad/yoga.nix: -------------------------------------------------------------------------------- 1 | { 2 | # automatic screen orientation 3 | hardware.sensor.iio.enable = true; 4 | } 5 | -------------------------------------------------------------------------------- /lenovo/thinkpad/z/gen1/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: { 2 | imports = [ 3 | ../../../../lenovo/thinkpad/z 4 | ]; 5 | 6 | # Kernel 5.18 is required for the Ryzen 6000 series 7 | boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); 8 | } 9 | -------------------------------------------------------------------------------- /lenovo/thinkpad/z/gen1/z13/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../../../lenovo/thinkpad/z/gen1 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /lenovo/thinkpad/z/gen2/z13/asound.conf: -------------------------------------------------------------------------------- 1 | pcm.!default { 2 | type plug 3 | slave.pcm "hw:1,0" 4 | } 5 | 6 | ctl.!default { 7 | type hw 8 | card 1 9 | } 10 | -------------------------------------------------------------------------------- /lenovo/thinkpad/z/gen2/z13/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../../../lenovo/thinkpad/z/gen2 6 | ]; 7 | 8 | environment.etc."asound.conf".source = ./asound.conf; 9 | 10 | networking = 11 | let 12 | fcc_unlock_script = rec { 13 | id = "2c7c:030a"; 14 | path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/${id}"; 15 | }; 16 | in 17 | if lib.versionOlder lib.version "25.05pre" then 18 | { networkmanager.fccUnlockScripts = [ fcc_unlock_script ]; } 19 | else 20 | { modemmanager.fccUnlockScripts = [ fcc_unlock_script ]; }; 21 | } 22 | -------------------------------------------------------------------------------- /lenovo/thinkpad/z13/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | assertions = [ 3 | { 4 | assertion = true; 5 | message = '' 6 | Lenovo Z-series received a second generation so the hardware configuration has been split by generation. For the Z13 Gen 1 config, change from `lenovo-thinkpad-z13` to `lenovo-thinkpad-z13-gen1`. 7 | ''; 8 | } 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/yoga/7/14ARH7/amdgpu/default.nix: -------------------------------------------------------------------------------- 1 | # Including this file will enable the AMD-GPU driver (in shared.nix) 2 | { 3 | imports = [ ../shared.nix ]; 4 | } 5 | -------------------------------------------------------------------------------- /lenovo/yoga/7/14ARH7/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | assertions = [ 5 | { 6 | assertion = false; 7 | message = "Importing lenovo/yoga/7/14ARH7/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md for more details"; 8 | } 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /lenovo/yoga/7/14IAH7/shared.nix: -------------------------------------------------------------------------------- 1 | /* 2 | * Here are configurations for the 3 | * Intel Core i7-12700H CPU, along 4 | * with a few others. 5 | */ 6 | { 7 | imports = [ 8 | ../../../../common/cpu/intel/alder-lake 9 | ../../../../common/gpu/intel/alder-lake 10 | ../../../../common/pc/laptop 11 | ../../../../common/pc/ssd 12 | ]; 13 | 14 | boot = { 15 | kernelModules = [ "kvm-intel" ]; 16 | # Info: 17 | kernelParams = [ "pcie_aspm.policy=powersupersave" ]; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /lenovo/yoga/7/14ILL10/README.md: -------------------------------------------------------------------------------- 1 | # Lenovo Slim 7 14ILL10 2 | 3 | This module imports configuration for the Lunar Lake processors as well as ensuring that the Linux kernel is up to date enough for most features to be available. This does not make the device's built-in speakers or audio jack function. 4 | -------------------------------------------------------------------------------- /lenovo/yoga/7/14ILL10/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../../../../common/cpu/intel/lunar-lake 5 | ../../../../common/pc/laptop 6 | ../../../../common/pc/ssd 7 | ]; 8 | 9 | # touchpad, wifi, and bluetooth do not work before 6.12 10 | config.boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.12") ( 11 | lib.mkDefault pkgs.linuxPackages_latest 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /malibal/aon/s1/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/pc/laptop 6 | ../../../common/pc/ssd 7 | 8 | ../../../common/cpu/intel 9 | 10 | ../../../common/gpu/nvidia/disable.nix 11 | ]; 12 | 13 | boot = { 14 | kernelParams = [ 15 | "mem_sleep_default=deep" 16 | "i915.fastboot=1" 17 | ]; 18 | kernelModules = [ 19 | "coretemp" 20 | ]; 21 | }; 22 | 23 | powerManagement = { 24 | powertop.enable = lib.mkDefault true; 25 | }; 26 | 27 | services = { 28 | fwupd = { 29 | enable = lib.mkDefault true; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /microchip/README.md: -------------------------------------------------------------------------------- 1 | # Microchip Icicle-kit board support 2 | 3 | ## 1. Supported devices 4 | - [Microchip Icicle Kit](https://www.microchip.com/en-us/development-tool/MPFS-ICICLE-KIT-ES) (**mpfs-icicle-kit**) - device-specific U-boot and Linux kernel, nixos configuration example. 5 | 6 | ## 2. How to use? 7 | Currently this overlay is used for generating bootable NixOS SD images. 8 | 9 | Code snippet example that enables icicle-kit configuration: 10 | ``` 11 | { nixos-hardware, }: { 12 | system = "riscv64-linux"; 13 | modules = [ 14 | nixos-hardware.nixosModules.icicle-kit 15 | ]; 16 | } 17 | ``` 18 | -------------------------------------------------------------------------------- /microchip/common/modules.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, config, ... }: { 2 | boot = { 3 | kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-icicle-kit.nix { 4 | inherit (config.boot) kernelPatches; 5 | }); 6 | initrd.includeDefaultModules = lib.mkDefault false; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /microchip/icicle-kit/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | nixpkgs.overlays = [ 3 | (import ./overlay.nix) 4 | ]; 5 | 6 | imports = [ 7 | ../common/modules.nix 8 | ]; 9 | 10 | hardware.deviceTree = { 11 | name = "microchip/mpfs-icicle-kit.dtb"; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /microchip/icicle-kit/overlay.nix: -------------------------------------------------------------------------------- 1 | final: _prev: { 2 | uboot-icicle-kit = final.callPackage ./../common/bsp/uboot.nix { pkgs = final; targetBoard = "microchip_mpfs_icicle";}; 3 | } 4 | -------------------------------------------------------------------------------- /microsoft/surface-pro/3/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../../surface/surface-pro-intel ]; 3 | } 4 | -------------------------------------------------------------------------------- /microsoft/surface-pro/9/README.md: -------------------------------------------------------------------------------- 1 | # Microsoft Surface Pro 9 2 | 3 | ## Note on Intel Panel Self Refresh (PSR) 4 | 5 | Intel GPUs support a feature called [Panel Self Refresh (PSR)](https://www.intel.com/content/www/us/en/support/articles/000057194/graphics.html), where the display refreshes independently of the OS. Out of the box, this can cause lots of display lag, stuttering, and enormous refresh rate drops. 6 | 7 | This configuration disables PSR by adding `i915.enable_psr=0` to the kernel boot parameters, at the cost of some battery life. If you want to turn PSR back on, add `i915.enable_psr=1` to your `boot.kernelParams`. 8 | -------------------------------------------------------------------------------- /microsoft/surface-pro/9/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ ../../surface/surface-pro-intel ]; 3 | 4 | boot.kernelParams = [ "i915.enable_psr=0" ]; # Disable Intel Panel Self Refresh 5 | } -------------------------------------------------------------------------------- /microsoft/surface/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | assertions = [ 5 | { 6 | assertion = false; 7 | message = "Importing microsoft/surface/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md for more details."; 8 | } 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /milkv/pioneer/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | 3 | { 4 | boot = { 5 | consoleLogLevel = lib.mkDefault 7; 6 | initrd = { 7 | availableKernelModules = [ 8 | "amdgpu" 9 | "radeon" 10 | "mmc_block" 11 | "sdhci_sophgo" 12 | ]; 13 | }; 14 | kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./linux.nix { 15 | inherit (config.boot) kernelPatches; 16 | }); 17 | kernelParams = lib.mkDefault [ 18 | "earlycon" 19 | "console=ttyS0,115200" 20 | "console=tty1" 21 | ]; 22 | }; 23 | 24 | hardware.deviceTree = { 25 | enable = true; 26 | name = lib.mkDefault "sophgo/mango-milkv-pioneer.dtb"; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /milkv/pioneer/fip.nix: -------------------------------------------------------------------------------- 1 | { fetchurl, ... }: 2 | 3 | # Download the vendor's Firmware Image Package 4 | fetchurl { 5 | url = "https://github.com/sophgo/bootloader-riscv/raw/3f750677e0249ff549ad3fe20bbc800998503539/firmware/fip.bin"; 6 | hash = "sha256-rav00Ok6+FU77lI0piQPHCaz7Tw1RSbyUal4PyeSccg="; 7 | } 8 | -------------------------------------------------------------------------------- /milkv/pioneer/linuxboot-kernel.nix: -------------------------------------------------------------------------------- 1 | { fetchFromGitHub, lib, linuxManualConfig, stdenv, ... }: 2 | 3 | linuxManualConfig rec { 4 | inherit lib stdenv; 5 | modDirVersion = "6.6.20"; 6 | version = "${modDirVersion}-milkv-pioneer"; 7 | src = fetchFromGitHub { 8 | owner = "sophgo"; 9 | repo = "linux-riscv"; 10 | rev = "caa949e3690fe8a4656313b2b56f52666fa880db"; 11 | hash = "sha256-qJpR3KMgvP4tfPfBfQ/MiEWg/uuuxHYuACK8taKKK3E="; 12 | }; 13 | configfile = "${src}/arch/riscv/configs/sophgo_mango_normal_defconfig"; 14 | extraMeta.branch = "sg2042-dev-6.6"; 15 | } 16 | -------------------------------------------------------------------------------- /milkv/pioneer/sd-image-installer.nix: -------------------------------------------------------------------------------- 1 | { modulesPath, ... }: 2 | 3 | { 4 | imports = [ 5 | "${modulesPath}/profiles/installation-device.nix" 6 | ./sd-image.nix 7 | ]; 8 | 9 | # the installation media is also the installation target, 10 | # so we don't want to provide the installation configuration.nix. 11 | installer.cloneConfig = false; 12 | } 13 | -------------------------------------------------------------------------------- /milkv/pioneer/zsbl-increase-timeout.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/sd/sd.c 2 | +++ b/drivers/sd/sd.c 3 | @@ -560,11 +560,11 @@ static int bm_sd_read(int lba, uintptr_t buf, size_t size) 4 | } else { 5 | udelay(1); 6 | timeout++; 7 | } 8 | 9 | - if (timeout >= 10000) { 10 | + if (timeout >= 100000) { 11 | printf("sdhci read data timeout\n"); 12 | goto timeout; 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /minisforum/v3/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ 4 | ./sensors.nix 5 | ./audio.nix 6 | ./power.nix 7 | 8 | ../../common/gpu/amd/default.nix 9 | ../../common/cpu/amd/default.nix 10 | ../../common/pc/laptop/default.nix 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /minisforum/v3/power.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | 4 | # From "Optimizing power draw (under Linux)": https://github.com/mudkipme/awesome-minisforum-v3/issues/5#issue-2391536450 5 | boot.kernelParams = [ "pcie_aspm.policy=powersupersave" ]; 6 | systemd.services.enable-aspm = { 7 | wantedBy = [ "default.target" ]; 8 | serviceConfig = { 9 | ExecStart = "${pkgs.bash}/bin/bash ${pkgs.callPackage ./src.nix { }}/aspm_v3.sh"; 10 | Restart = "no"; 11 | }; 12 | 13 | path = with pkgs; [ 14 | bc 15 | pciutils 16 | ]; 17 | }; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /minisforum/v3/src.nix: -------------------------------------------------------------------------------- 1 | # Outsource (MIT License) for aspm_v3.sh and dsdt.dsl 2 | { fetchFromGitHub, ... }: 3 | fetchFromGitHub { 4 | owner = "eum3l"; 5 | repo = "minisforum-v3-nixos-hardware"; 6 | rev = "7a94dbac701640cef91ec5b1873868a512718f09"; 7 | hash = "sha256-V23Vuw/DV0l2c0m2hBnjZ2uey0KMeAdymnlLqXbFFUM="; 8 | } 9 | -------------------------------------------------------------------------------- /morefine/m600/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ...}: { 2 | imports = [ 3 | ../../common/cpu/amd 4 | ../../common/cpu/amd/pstate.nix 5 | ../../common/gpu/amd 6 | ]; 7 | 8 | hardware.enableRedistributableFirmware = lib.mkDefault true; 9 | 10 | # If the wireless card is not replaced 11 | # boot.initrd.availableKernelModules = [ "r8169" ]; 12 | } 13 | -------------------------------------------------------------------------------- /msi/b350-tomahawk/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../common/cpu/amd 4 | ../../common/pc/ssd 5 | ../../common/pc 6 | ]; 7 | 8 | boot.kernelModules = ["nct6775"]; 9 | } 10 | -------------------------------------------------------------------------------- /msi/b550-a-pro/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../common/cpu/amd 4 | ../../common/pc/ssd 5 | ../../common/pc 6 | ]; 7 | 8 | boot.kernelModules = ["nct6683"]; 9 | } 10 | -------------------------------------------------------------------------------- /msi/gl62/README.md: -------------------------------------------------------------------------------- 1 | This module is for MS-16J61-based laptops with unified BIOS of E16J6IMS, which includes: 2 | 3 | - MSI GL62 6QD 4 | - MSI GL62 6QC 5 | - MSI CX62 6QD 6 | - MSI CR62 6M 7 | -------------------------------------------------------------------------------- /msi/gl65/10SDR-492/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../common/pc/ssd 6 | ../../../common/cpu/intel/comet-lake 7 | ../../../common/gpu/nvidia/prime.nix 8 | ../../../common/gpu/nvidia/turing 9 | ../../../common/pc/laptop 10 | ]; 11 | 12 | hardware.bluetooth.enable = lib.mkDefault true; 13 | 14 | hardware.graphics.enable = lib.mkDefault true; 15 | 16 | hardware.nvidia = { 17 | prime = { 18 | # Bus ID of the Intel GPU. 19 | intelBusId = lib.mkDefault "PCI:0:2:0"; 20 | 21 | # Bus ID of the NVIDIA GPU. 22 | nvidiaBusId = lib.mkDefault "PCI:1:0:0"; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /msi/gs60/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | imports = [ 4 | ../../common/cpu/intel 5 | ../../common/pc/laptop 6 | ]; 7 | 8 | boot = { 9 | 10 | # Interferes with Fn- action keys 11 | kernelParams = [ "video.report_key_events=0" ]; 12 | 13 | # Workaround for problematic firmware loading 14 | extraModprobeConfig = '' 15 | options ath10k_core skip_otp=y 16 | ''; 17 | 18 | }; 19 | 20 | # Laptop can't correctly suspend if wlan is active 21 | powerManagement = { 22 | powerDownCommands = '' 23 | ${pkgs.util-linux}/bin/rfkill block wlan 24 | ''; 25 | resumeCommands = '' 26 | ${pkgs.util-linux}/bin/rfkill unblock wlan 27 | ''; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /nxp/common/modules.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, ... }: { 2 | nixpkgs.hostPlatform = "aarch64-linux"; 3 | 4 | boot = { 5 | kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-imx8.nix { }); 6 | kernelParams = [ "console=ttyLP0,115200n8" ]; 7 | loader.grub.enable = lib.mkDefault true; 8 | initrd.includeDefaultModules = lib.mkForce false; 9 | }; 10 | 11 | disabledModules = [ "profiles/all-hardware.nix" ]; 12 | 13 | hardware.deviceTree.enable = true; 14 | } 15 | -------------------------------------------------------------------------------- /nxp/imx8mp-evk/bsp/imx8mp-firmware.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: 2 | with pkgs; 3 | stdenv.mkDerivation rec { 4 | pname = "imx8mp-firmware"; 5 | version = "8.22"; 6 | 7 | src = pkgs.fetchurl { 8 | url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; 9 | sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; 10 | }; 11 | 12 | dontUnpack = true; 13 | dontStrip = true; 14 | 15 | installPhase = '' 16 | ${pkgs.bash}/bin/bash $src --auto-accept --force 17 | mv firmware-imx-${version} $out 18 | ''; 19 | } 20 | -------------------------------------------------------------------------------- /nxp/imx8mp-evk/default.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: { 2 | nixpkgs.overlays = [ 3 | (import ./overlay.nix) 4 | ]; 5 | 6 | imports = [ 7 | ./modules.nix 8 | ]; 9 | 10 | boot.loader.grub.extraFiles = { 11 | "imx8mp-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mp-linux.nix {}}/dtbs/freescale/imx8mp-evk.dtb"; 12 | }; 13 | 14 | hardware.deviceTree = { 15 | filter = "imx8mp-*.dtb"; 16 | name = "imx8mp-evk.dtb"; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /nxp/imx8mp-evk/modules.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | ... 5 | }: { 6 | nixpkgs.hostPlatform = "aarch64-linux"; 7 | 8 | boot = { 9 | kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mp-linux.nix {}); 10 | initrd.includeDefaultModules = lib.mkForce false; 11 | }; 12 | 13 | disabledModules = ["profiles/all-hardware.nix"]; 14 | 15 | hardware.deviceTree.enable = true; 16 | } 17 | -------------------------------------------------------------------------------- /nxp/imx8mp-evk/overlay.nix: -------------------------------------------------------------------------------- 1 | final: prev: { 2 | inherit (final.callPackage ./bsp/imx8mp-boot.nix {pkgs = final;}) imx8m-boot; 3 | } 4 | -------------------------------------------------------------------------------- /nxp/imx8mq-evk/bsp/imx8mq-firmware.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: 2 | with pkgs; 3 | stdenv.mkDerivation rec { 4 | pname = "imx8mq-firmware"; 5 | version = "8.22"; 6 | 7 | src = pkgs.fetchurl { 8 | url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; 9 | sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; 10 | }; 11 | 12 | dontUnpack = true; 13 | dontStrip = true; 14 | 15 | installPhase = '' 16 | ${pkgs.bash}/bin/bash $src --auto-accept --force 17 | mv firmware-imx-${version} $out 18 | ''; 19 | } 20 | -------------------------------------------------------------------------------- /nxp/imx8mq-evk/default.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: { 2 | nixpkgs.overlays = [ 3 | (import ./overlay.nix) 4 | ]; 5 | 6 | imports = [ 7 | ./modules.nix 8 | ]; 9 | 10 | boot.loader.grub.extraFiles = { 11 | "imx8mq-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mq-linux.nix {}}/dtbs/freescale/imx8mq-evk.dtb"; 12 | }; 13 | 14 | hardware.deviceTree = { 15 | filter = "imx8mq-*.dtb"; 16 | name = "imx8mq-evk.dtb"; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /nxp/imx8mq-evk/modules.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | ... 5 | }: { 6 | nixpkgs.hostPlatform = "aarch64-linux"; 7 | 8 | boot = { 9 | kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mq-linux.nix {}); 10 | initrd.includeDefaultModules = lib.mkForce false; 11 | }; 12 | 13 | disabledModules = ["profiles/all-hardware.nix"]; 14 | 15 | hardware.deviceTree.enable = true; 16 | } 17 | -------------------------------------------------------------------------------- /nxp/imx8mq-evk/overlay.nix: -------------------------------------------------------------------------------- 1 | final: prev: { 2 | inherit (final.callPackage ./bsp/imx8mq-boot.nix {pkgs = final;}) imx8m-boot; 3 | } 4 | -------------------------------------------------------------------------------- /nxp/imx8qm-mek/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | nixpkgs.overlays = [ 5 | (import ./overlay.nix) 6 | ]; 7 | 8 | imports = [ 9 | ../common/modules.nix 10 | ]; 11 | 12 | boot.loader.grub.extraFiles = { 13 | "imx8qm-mek.dtb" = "${pkgs.callPackage ../common/bsp/linux-imx8.nix { }}/dtbs/freescale/imx8qm-mek.dtb"; 14 | }; 15 | 16 | hardware.deviceTree = { 17 | filter = "imx8qm-*.dtb"; 18 | name = "imx8qm-mek.dtb"; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /nxp/imx8qm-mek/overlay.nix: -------------------------------------------------------------------------------- 1 | final: prev: { 2 | inherit ( final.callPackage ../common/bsp/imx-uboot.nix { pkgs = final; targetBoard = "imx8qm"; }) ubootImx8 imx-firmware; 3 | } 4 | -------------------------------------------------------------------------------- /nxp/imx8qxp-mek/overlay.nix: -------------------------------------------------------------------------------- 1 | final: prev: { 2 | inherit ( final.callPackage ../common/bsp/imx-uboot.nix { pkgs = final; targetBoard = "imx8qxp"; }) ubootImx8 imx-firmware; 3 | } 4 | -------------------------------------------------------------------------------- /omen/14-fb0798ng/README.md: -------------------------------------------------------------------------------- 1 | # HP Omen 14-fb0798ng 2 | 3 | ## ACPI platform profiles 4 | This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. 5 | -------------------------------------------------------------------------------- /omen/14-fb0798ng/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/intel 6 | ../../common/gpu/nvidia/prime.nix 7 | ../../common/gpu/nvidia/ada-lovelace 8 | ../../common/pc/laptop 9 | ../../common/pc/ssd 10 | ]; 11 | 12 | # Enables ACPI platform profiles 13 | boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { 14 | kernelModules = [ "hp-wmi" ]; 15 | }; 16 | 17 | # Enables Wifi and Bluetooth 18 | hardware.enableRedistributableFirmware = true; 19 | 20 | hardware.nvidia.prime = { 21 | intelBusId = "PCI:0:2:0"; 22 | nvidiaBusId = "PCI:1:0:0"; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /omen/15-ce002ns/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/intel/kaby-lake 6 | ../../common/gpu/nvidia/pascal 7 | ../../common/pc/laptop 8 | ../../common/pc/ssd 9 | ../../common/pc/laptop/hdd 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /omen/15-en0002np/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/amd 6 | ../../common/cpu/amd/pstate.nix 7 | ../../common/gpu/nvidia/prime.nix 8 | ../../common/gpu/nvidia/turing 9 | ../../common/pc/laptop 10 | ../../common/pc/ssd 11 | ]; 12 | 13 | hardware.nvidia.prime = { 14 | amdgpuBusId = "PCI:6:0:0"; 15 | nvidiaBusId = "PCI:1:0:0"; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /omen/15-en0010ca/README.md: -------------------------------------------------------------------------------- 1 | # HP Omen 15-en0001ca 2 | 3 | ## ACPI platform profiles 4 | This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. -------------------------------------------------------------------------------- /omen/15-en0010ca/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/amd 6 | ../../common/cpu/amd/pstate.nix 7 | ../../common/gpu/amd 8 | ../../common/gpu/nvidia/prime.nix 9 | ../../common/gpu/nvidia/turing 10 | ../../common/pc/laptop 11 | ../../common/pc/ssd 12 | ]; 13 | 14 | # Enables ACPI platform profiles 15 | boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { 16 | kernelModules = [ "hp-wmi" ]; 17 | }; 18 | 19 | hardware.nvidia.prime = { 20 | amdgpuBusId = "PCI:7:0:0"; 21 | nvidiaBusId = "PCI:1:0:0"; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /omen/15-en1007sa/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/amd 6 | ../../common/cpu/amd/pstate.nix 7 | ../../common/gpu/nvidia/prime.nix 8 | ../../common/gpu/nvidia/ampere 9 | ../../common/pc/laptop 10 | ../../common/pc/ssd 11 | ]; 12 | 13 | # Enables ACPI platform profiles 14 | boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { 15 | kernelModules = [ "hp-wmi" ]; 16 | }; 17 | 18 | hardware.nvidia.prime = { 19 | amdgpuBusId = "PCI:6:0:0"; 20 | nvidiaBusId = "PCI:1:0:0"; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /omen/16-n0005ne/README.md: -------------------------------------------------------------------------------- 1 | # HP Omen 16-n0005ne 2 | 3 | ## ACPI platform profiles 4 | This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. 5 | -------------------------------------------------------------------------------- /omen/16-n0005ne/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/amd 6 | ../../common/cpu/amd/pstate.nix 7 | ../../common/gpu/amd 8 | ../../common/pc/laptop 9 | ../../common/pc/ssd 10 | ]; 11 | 12 | # Enables ACPI platform profiles 13 | boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { 14 | kernelModules = [ "hp-wmi" ]; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /omen/16-n0280nd/README.md: -------------------------------------------------------------------------------- 1 | # HP Omen 16-n0280nd 2 | 3 | ## ACPI platform profiles 4 | 5 | This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. 6 | -------------------------------------------------------------------------------- /omen/16-n0280nd/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../common/cpu/amd 6 | ../../common/cpu/amd/pstate.nix 7 | ../../common/gpu/nvidia/prime.nix 8 | ../../common/gpu/nvidia/ampere 9 | ../../common/pc/laptop 10 | ../../common/pc/ssd 11 | ]; 12 | 13 | # Enables ACPI platform profiles 14 | boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { 15 | kernelModules = [ "hp-wmi" ]; 16 | }; 17 | 18 | hardware.nvidia.prime = { 19 | amdgpuBusId = "PCI:6:0:0"; 20 | nvidiaBusId = "PCI:1:0:0"; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /onenetbook/4/goodix-stylus-mastykin/5.12.12.patch.patch: -------------------------------------------------------------------------------- 1 | --- orig/patch1 2 | +++ updated/patch1 3 | @@ -10,11 +10,11 @@ 4 | /* quirks to control the device */ 5 | #define MT_QUIRK_NOT_SEEN_MEANS_UP BIT(0) 6 | #define MT_QUIRK_SLOT_IS_CONTACTID BIT(1) 7 | -@@ -70,6 +73,7 @@ 8 | - #define MT_QUIRK_WIN8_PTP_BUTTONS BIT(18) 9 | +@@ -71,6 +74,7 @@ 10 | #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19) 11 | #define MT_QUIRK_FORCE_MULTI_INPUT BIT(20) 12 | -+#define MT_QUIRK_NON_MT_PEN BIT(21) 13 | + #define MT_QUIRK_DISABLE_WAKEUP BIT(21) 14 | ++#define MT_QUIRK_NON_MT_PEN BIT(22) 15 | 16 | #define MT_INPUTMODE_TOUCHSCREEN 0x02 17 | #define MT_INPUTMODE_TOUCHPAD 0x03 18 | -------------------------------------------------------------------------------- /onenetbook/4/goodix-stylus-mastykin/Makefile: -------------------------------------------------------------------------------- 1 | obj-m += hid-multitouch-onenetbook4.o 2 | 3 | all: 4 | make -C $(KERNEL_DIR) M=$(PWD) modules 5 | 6 | install: 7 | make -C $(KERNEL_DIR) M=$(PWD) modules_install 8 | -------------------------------------------------------------------------------- /panasonic/letsnote/cf-lx4/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc/laptop 5 | ../../../common/pc/ssd 6 | ]; 7 | 8 | # Force use of the intel_backlight driver for backlight control. 9 | # This allows the backlight save/load systemd service to work. 10 | boot.kernelParams = [ "acpi_backlight=video" ]; 11 | } 12 | -------------------------------------------------------------------------------- /pcengines/apu/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | boot.kernelParams = [ "console=ttyS0,115200n8" ]; 3 | boot.loader.grub.extraConfig = " 4 | serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 5 | terminal_input serial 6 | terminal_output serial 7 | "; 8 | } 9 | -------------------------------------------------------------------------------- /pine64/pinebook-pro/keyboard-updater/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchFromGitHub, xxd, libusb }: 2 | 3 | stdenv.mkDerivation { 4 | pname = "pinebook-pro-keyboard-updater"; 5 | version = "2021-07-28"; 6 | 7 | nativeBuildInputs = [ 8 | xxd 9 | ]; 10 | 11 | buildInputs = [ 12 | libusb 13 | ]; 14 | 15 | installPhase = '' 16 | mkdir -p $out/bin 17 | cp -v updater $out/bin 18 | ''; 19 | 20 | src = fetchFromGitHub { 21 | owner = "dragan-simic"; 22 | repo = "pinebook-pro-keyboard-updater"; 23 | rev = "bd8d2ea48992b3e6ddd0b9435d21b74cdcf97224"; 24 | hash = "sha256-3+Qsa5lk1EJrLvPSyWthqBMTqJCigbJSmnsS6hdu+w8="; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /pine64/pinebook-pro/overlay.nix: -------------------------------------------------------------------------------- 1 | final: _super: 2 | 3 | let 4 | inherit (final) callPackage; 5 | in 6 | { 7 | pinebookpro-keyboard-updater = callPackage ./keyboard-updater { }; 8 | } 9 | -------------------------------------------------------------------------------- /pine64/rockpro64/README.md: -------------------------------------------------------------------------------- 1 | # Pine64 RockPro64 2 | 3 | ## _Tow-Boot_ 4 | 5 | We highly suggest installing _Tow-Boot_ to the SPI Flash. 6 | 7 | - https://github.com/Tow-Boot/Tow-Boot 8 | 9 | Having the firmware installed to SPI makes the device act basically like a 10 | normal computer. No need for weird incantations to setup the platform boot 11 | firmware. 12 | 13 | Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to 14 | deal with and understand than having to deal with _U-Boot_ manually. 15 | 16 | ## Console 17 | 18 | To configure default console I/O to use serial instead of HDMI (default): 19 | 20 | ```nix 21 | hardware.rockpro64.console = "serial"; 22 | ``` 23 | -------------------------------------------------------------------------------- /pine64/rockpro64/console.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | { 3 | options.hardware.rockpro64.console = lib.mkOption { 4 | default = "hdmi"; 5 | description = "Default console to use at boot."; 6 | type = lib.types.enum [ 7 | "hdmi" 8 | "serial" 9 | ]; 10 | }; 11 | config = lib.mkIf (config.hardware.rockpro64.console == "hdmi") { 12 | boot.kernelParams = [ 13 | "console=ttyS0" 14 | "console=tty0" 15 | ]; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /pine64/star64/opensbi.nix: -------------------------------------------------------------------------------- 1 | { opensbi, withPayload, withFDT }: 2 | 3 | (opensbi.override { 4 | inherit withPayload withFDT; 5 | }).overrideAttrs (attrs: { 6 | makeFlags = attrs.makeFlags ++ [ 7 | # opensbi generic platform default FW_TEXT_START is 0x80000000 8 | # For JH7110, need to specify the FW_TEXT_START to 0x40000000 9 | # Otherwise, the fw_payload.bin downloading via jtag will not run. 10 | # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 11 | "FW_TEXT_START=0x40000000" 12 | ]; 13 | }) 14 | 15 | -------------------------------------------------------------------------------- /pine64/star64/sd-image-installer.nix: -------------------------------------------------------------------------------- 1 | { modulesPath, ... }: 2 | { 3 | imports = [ 4 | "${modulesPath}/profiles/installation-device.nix" 5 | ./sd-image.nix 6 | ]; 7 | 8 | # The installation media is also the installation target, 9 | # so we don't want to provide the installation configuration.nix. 10 | installer.cloneConfig = false; 11 | } 12 | -------------------------------------------------------------------------------- /pine64/star64/spl-tool.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchFromGitHub }: 2 | 3 | stdenv.mkDerivation rec{ 4 | pname = "spi_tool"; 5 | version = "unstable-2023-04-14"; 6 | src = fetchFromGitHub { 7 | owner = "starfive-tech"; 8 | repo = "Tools"; 9 | rev = "693661d4ba314424f76c06da1bbb799e9b534c9f"; 10 | hash = "sha256-POWwpIIPnquJs/bpC3Pn94skua3SZvyfICPBglO7HnU="; 11 | sparseCheckout = [ "spl_tool" ]; 12 | }; 13 | sourceRoot = "source/spl_tool"; 14 | installPhase = '' 15 | mkdir -p $out/bin 16 | cp spl_tool $out/bin 17 | ''; 18 | } 19 | -------------------------------------------------------------------------------- /pine64/star64/star64-8GB.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | /plugin/; 3 | / { 4 | compatible = "pine64,star64", "starfive,jh7110"; 5 | fragment@0 { 6 | target-path = "/memory@40000000"; 7 | __overlay__ { 8 | reg = <0x0 0x40000000 0x2 0x0>; 9 | }; 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /pine64/star64/uboot.nix: -------------------------------------------------------------------------------- 1 | { fetchFromGitHub, buildUBoot }: 2 | 3 | buildUBoot rec { 4 | version = "3.0.4"; 5 | 6 | src = fetchFromGitHub { 7 | owner = "Fishwaldo"; 8 | repo = "u-boot"; 9 | rev = "172b47f62039605d6806fa96bd403c21cda28996"; # Star64 branch 10 | hash = "sha256-UBPTLbSjDdL6NPUrAdsWcL28QSyiY/5oA+iqxl9dEGY="; 11 | }; 12 | 13 | defconfig = "pine64_star64_defconfig"; 14 | filesToInstall = [ 15 | "u-boot.bin" 16 | "arch/riscv/dts/pine64_star64.dtb" 17 | "spl/u-boot-spl.bin" 18 | "tools/mkimage" 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /protectli/vp4670/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../common/cpu/intel/comet-lake 4 | ]; 5 | 6 | boot.initrd.kernelModules = [ 7 | "sdhci_pci" # 16G eMMC on board 8 | ]; 9 | 10 | boot.kernelModules = [ 11 | "it87" # ITE IT8786E Super IO Sensors 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /purism/librem/13v3/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../../../common/cpu/intel 4 | ../../../common/pc/laptop 5 | ]; 6 | 7 | # https://github.com/systemd/systemd/pull/9318 8 | services.udev.extraHwdb = '' 9 | # Purism Librem 13 V3 10 | evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism*:pn*Librem13v3*:pvr* 11 | KEYBOARD_KEY_56=backslash 12 | ''; 13 | } 14 | -------------------------------------------------------------------------------- /purism/librem/15v3: -------------------------------------------------------------------------------- 1 | 13v3/ -------------------------------------------------------------------------------- /purism/librem/5r4/u-boot/build.nix: -------------------------------------------------------------------------------- 1 | with import { system = "aarch64-linux"; }; callPackage ./. { } 2 | -------------------------------------------------------------------------------- /purism/librem/5r4/wifi.nix: -------------------------------------------------------------------------------- 1 | { config, lib, ... }: 2 | lib.mkIf (config.hardware.librem5.wifiCard == "redpine") { 3 | # Disable mainline rsi module 4 | boot.blacklistedKernelModules = [ 5 | "rsi_91x" 6 | "rsi_sdio" 7 | ]; 8 | 9 | # Load redpine in Wi-Fi station + BT dual mode 10 | boot.extraModprobeConfig = '' 11 | options redpine_91x dev_oper_mode=13 rsi_zone_enabled=1 antenna_diversity=1 12 | ''; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /radxa/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: 6 | let 7 | cfg = config.hardware.radxa; 8 | in { 9 | options.hardware.radxa = { 10 | enable = lib.mkEnableOption "Radxa system support"; 11 | }; 12 | 13 | config = lib.mkIf cfg.enable { 14 | boot = { 15 | # Currently enable bcachefs automatically set 16 | # kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; 17 | # TODO: Consider removing this line once, we get an LTS kernel that is newer than 6.12 18 | kernelPackages = lib.mkOverride 990 pkgs.linuxPackages_latest; 19 | supportedFilesystems = [ "bcachefs" ]; 20 | loader.systemd-boot.enable = lib.mkDefault true; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /radxa/disko.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: 6 | let 7 | cfg = config.hardware.radxa; 8 | in { 9 | imports = [ 10 | ../rockchip/disko.nix 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /radxa/rock-4c-plus/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: { 6 | imports = [ 7 | ../. 8 | ../../rockchip 9 | ]; 10 | 11 | config = { 12 | hardware = { 13 | radxa.enable = true; 14 | rockchip = { 15 | rk3399.enable = true; 16 | platformFirmware = lib.mkDefault pkgs.ubootRock4CPlus; 17 | }; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /radxa/rock-5b/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: { 6 | imports = [ 7 | ../. 8 | ../../rockchip 9 | ]; 10 | 11 | config = { 12 | hardware = { 13 | radxa.enable = true; 14 | rockchip = { 15 | rk3588.enable = true; 16 | platformFirmware = lib.mkDefault pkgs.ubootRock5ModelB; 17 | }; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /radxa/rock-pi-4/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: { 6 | imports = [ 7 | ../. 8 | ../../rockchip 9 | ]; 10 | 11 | config = { 12 | hardware = { 13 | radxa.enable = true; 14 | rockchip = { 15 | rk3399.enable = true; 16 | platformFirmware = lib.mkDefault pkgs.ubootRockPi4; 17 | }; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /radxa/rock-pi-e/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: { 6 | imports = [ 7 | ../. 8 | ../../rockchip 9 | ]; 10 | 11 | config = { 12 | hardware = { 13 | radxa.enable = true; 14 | rockchip = { 15 | rk3328.enable = true; 16 | platformFirmware = lib.mkDefault pkgs.ubootRockPiE; 17 | }; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /raspberry-pi/2/README.org: -------------------------------------------------------------------------------- 1 | ** Status 2 | 3 | The code in master as of June 2015 should be able to prepare a bootable NixOS 4 | for Raspberry PI 2. 5 | 6 | There are still some drawbacks: 7 | 8 | NixOS does not provide a /boot/config.txt (the FAT32 partition). Making NixOS 9 | work in the Raspberry PI 2 is mainly the result of the recent work of ambro718, 10 | Dezgeg and viric (#nixos@irc.freenode.net). 11 | -------------------------------------------------------------------------------- /raspberry-pi/4/cpu-revision.nix: -------------------------------------------------------------------------------- 1 | { 2 | hardware.deviceTree.overlays = [ 3 | { 4 | name = "rpi4-cpu-revision"; 5 | dtsText = '' 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "raspberrypi,4-model-b"; 11 | 12 | fragment@0 { 13 | target-path = "/"; 14 | __overlay__ { 15 | system { 16 | linux,revision = <0x00d03114>; 17 | }; 18 | }; 19 | }; 20 | }; 21 | ''; 22 | } 23 | ]; 24 | } 25 | -------------------------------------------------------------------------------- /rockchip/rk3328/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: 6 | let 7 | cfg = config.hardware.rockchip.rk3328; 8 | in { 9 | options.hardware.rockchip.rk3328 = { 10 | enable = lib.mkEnableOption "Rockchip RK3328 support"; 11 | }; 12 | 13 | config = lib.mkIf cfg.enable { 14 | hardware.rockchip.enable = true; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /rockchip/rk3399/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: 6 | let 7 | cfg = config.hardware.rockchip.rk3399; 8 | in { 9 | options.hardware.rockchip.rk3399 = { 10 | enable = lib.mkEnableOption "Rockchip RK3399 support"; 11 | }; 12 | 13 | config = lib.mkIf cfg.enable { 14 | hardware.rockchip.enable = true; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /rockchip/rk3399/disko.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: 6 | let 7 | cfg = config.hardware.rockchip.rk3399; 8 | in { 9 | config = lib.mkIf cfg.enable { 10 | nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ 11 | "arm-trusted-firmware-rk3399" 12 | ]; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /rockchip/rk3588/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , config 4 | , ... 5 | }: 6 | let 7 | cfg = config.hardware.rockchip.rk3588; 8 | in { 9 | options.hardware.rockchip.rk3588 = { 10 | enable = lib.mkEnableOption "Rockchip RK3588 support"; 11 | }; 12 | 13 | config = lib.mkIf cfg.enable { 14 | hardware.rockchip.enable = true; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /samsung/np900x3c/default.nix: -------------------------------------------------------------------------------- 1 | # TODO: use ../../common/pc/laptop 2 | {} 3 | -------------------------------------------------------------------------------- /starfive/visionfive/v1/sd-image-installer.nix: -------------------------------------------------------------------------------- 1 | # To build, use: 2 | # nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image-installer.nix -A config.system.build.sdImage 3 | { modulesPath, ... }: 4 | 5 | { 6 | imports = [ 7 | "${modulesPath}/profiles/installation-device.nix" 8 | ./sd-image.nix 9 | ]; 10 | 11 | # The installation media is also the installation target, 12 | # so we don't want to provide the installation configuration.nix. 13 | installer.cloneConfig = false; 14 | } 15 | -------------------------------------------------------------------------------- /starfive/visionfive/v1/uboot.nix: -------------------------------------------------------------------------------- 1 | { fetchFromGitHub 2 | , buildUBoot 3 | }: 4 | 5 | buildUBoot { 6 | version = "2022.04"; 7 | 8 | src = fetchFromGitHub { 9 | owner = "Madouura"; 10 | repo = "u-boot"; 11 | rev = "fe61fbcc8c5d3f7a589d2a6ea61855ab77de621f"; 12 | sha256 = "sha256-jMZYxAHB37pNzzLdb8wupZA1CeD0gB84x18B7XVzq/M="; 13 | }; 14 | 15 | defconfig = "starfive_jh7100_visionfive_smode_defconfig"; 16 | filesToInstall = [ "u-boot.bin" "u-boot.dtb" ]; 17 | } 18 | -------------------------------------------------------------------------------- /starfive/visionfive/v2/opensbi.nix: -------------------------------------------------------------------------------- 1 | { opensbi }: 2 | 3 | opensbi.overrideAttrs (attrs: { 4 | makeFlags = attrs.makeFlags ++ [ 5 | # opensbi generic platform default FW_TEXT_START is 0x80000000 6 | # For JH7110, need to specify the FW_TEXT_START to 0x40000000 7 | # Otherwise, the fw_payload.bin downloading via jtag will not run. 8 | # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 9 | # Also matches u-boot documentation: https://docs.u-boot.org/en/latest/board/starfive/visionfive2.html 10 | "FW_TEXT_START=0x40000000" 11 | "FW_OPTIONS=0" 12 | ]; 13 | }) 14 | -------------------------------------------------------------------------------- /starfive/visionfive/v2/sd-image-installer.nix: -------------------------------------------------------------------------------- 1 | { modulesPath, ... }: 2 | { 3 | imports = [ 4 | "${modulesPath}/profiles/installation-device.nix" 5 | ./sd-image.nix 6 | ]; 7 | 8 | # The installation media is also the installation target, 9 | # so we don't want to provide the installation configuration.nix. 10 | installer.cloneConfig = false; 11 | } 12 | -------------------------------------------------------------------------------- /starfive/visionfive/v2/spl-tool.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchFromGitHub }: 2 | 3 | stdenv.mkDerivation (finalAttrs: { 4 | pname = "spi_tool"; 5 | version = "0x01010101"; 6 | src = fetchFromGitHub { 7 | owner = "starfive-tech"; 8 | repo = "soft_3rdpart"; 9 | rev = "89ff3396250538548643c3322f74640712b80893"; 10 | sha256 = "sha256-Ni3pBWKgr4bYJb/uJ+5EbSQl6JwWoO2lZFk2Xpi63IA="; 11 | sparseCheckout = [ "spl_tool" ]; 12 | }; 13 | sourceRoot = "source/spl_tool"; 14 | installPhase = '' 15 | mkdir -p $out/bin 16 | cp spl_tool $out/bin 17 | ''; 18 | }) 19 | -------------------------------------------------------------------------------- /starfive/visionfive/v2/uboot.nix: -------------------------------------------------------------------------------- 1 | { buildUBoot 2 | , opensbi 3 | }: 4 | 5 | buildUBoot { 6 | extraMakeFlags = [ 7 | "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" 8 | ]; 9 | 10 | defconfig = "starfive_visionfive2_defconfig"; 11 | 12 | filesToInstall = [ 13 | "spl/u-boot-spl.bin.normal.out" 14 | "u-boot.itb" 15 | ]; 16 | } 17 | -------------------------------------------------------------------------------- /starlabs/README.md: -------------------------------------------------------------------------------- 1 | # [Star Labs](https://starlabs.systems) 2 | 3 | Star Labs machines are made for mainline Linux and most things just work! 4 | 5 | ID new hardware based on product_sku. For example, on the StarLite 5: 6 | 7 | ```console 8 | $ cat /sys/class/dmi/id/product_sku 9 | I5 10 | ``` 11 | -------------------------------------------------------------------------------- /starlabs/starlite/i5/README.md: -------------------------------------------------------------------------------- 1 | # [Star Labs StarLite 5 Tablet (I5)](https://starlabs.systems) 2 | 3 | Star Labs machines are made for mainline Linux and most things just work! 4 | 5 | The StarLite 5 is their first tablet, and the only hardware configuration oddity is an accelerometer that needs enabling and adjusting to rotate the display correctly. See the vendor's note at [support.starlabs.systems](https://support.starlabs.systems/kb/guides/starlite-fixing-rotation-on-older-kernel). 6 | -------------------------------------------------------------------------------- /starlabs/starlite/i5/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../../../common/cpu/intel 5 | ../../../common/pc/laptop 6 | ../../../common/pc/ssd 7 | ]; 8 | 9 | # Turn on IIO for accelerometer screen rotation. 10 | hardware.sensor.iio.enable = lib.mkDefault true; 11 | 12 | # Accelerometer is mounted to display with inverted Y axis. Adjust! 13 | services.udev.extraHwdb = '' 14 | sensor:modalias:acpi:KIOX000A*:dmi:*:* 15 | ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 16 | ''; 17 | } 18 | -------------------------------------------------------------------------------- /supermicro/a1sri-2758f/default.nix: -------------------------------------------------------------------------------- 1 | # http://www.supermicro.com/products/motherboard/Atom/X10/A1SRi-2758F.cfm 2 | # This board contains a TPM header, but you must supply your own module. 3 | { 4 | imports = [ ../. ]; 5 | } 6 | -------------------------------------------------------------------------------- /supermicro/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | boot.kernelModules = [ "ipmi_devintf" "ipmi_si" ]; 4 | environment.systemPackages = [ pkgs.ipmitool ]; 5 | } 6 | -------------------------------------------------------------------------------- /supermicro/m11sdv-8c-ln4f/default.nix: -------------------------------------------------------------------------------- 1 | # https://www.supermicro.com/en/products/motherboard/M11SDV-8C-LN4F 2 | { ... }: 3 | { 4 | imports = [ 5 | ../../common/cpu/amd 6 | ../. 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /supermicro/x10sll-f/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ]; 5 | 6 | boot.kernelModules = [ "jc42" "tpm_rng" ]; 7 | 8 | # services.cron.systemCronJobs = [ 9 | # # Reset 5-minute watchdog timer every minute 10 | # "* * * * * ${pkgs.ipmitool}/bin/ipmitool raw 0x30 0x97 1 5" 11 | # ]; 12 | } 13 | -------------------------------------------------------------------------------- /supermicro/x12scz-tln4f/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | imports = [ 4 | ../../common/cpu/intel 5 | ../. 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /system76/default.nix: -------------------------------------------------------------------------------- 1 | # Implementation of support for general System76 hardware. 2 | # 3 | # https://system76.com/ 4 | 5 | { lib, ... }: 6 | { 7 | imports = [ ../common/pc ]; 8 | 9 | hardware.system76.enableAll = lib.mkDefault true; 10 | } 11 | -------------------------------------------------------------------------------- /system76/galp5-1650/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../common/gpu/nvidia/prime.nix 6 | ../../common/gpu/nvidia/ampere 7 | ]; 8 | 9 | boot.initrd.kernelModules = [ "nvidia" ]; 10 | 11 | hardware.graphics = { 12 | enable = lib.mkDefault true; 13 | enable32Bit = lib.mkDefault true; 14 | }; 15 | 16 | hardware.nvidia = { 17 | 18 | # modesetting.enable = lib.mkDefault true; 19 | 20 | powerManagement.finegrained = lib.mkDefault true; 21 | 22 | prime = { 23 | intelBusId = "PCI:0:2:0"; 24 | nvidiaBusId = "PCI:23:0:0"; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /system76/gaze18/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | { 3 | imports = [ 4 | ../. 5 | ../../common/gpu/nvidia/prime.nix 6 | ../../common/gpu/nvidia/ampere 7 | ]; 8 | 9 | boot.initrd.kernelModules = [ "nvidia" ]; 10 | 11 | hardware.graphics = { 12 | enable = lib.mkDefault true; 13 | enable32Bit = lib.mkDefault true; 14 | }; 15 | 16 | hardware.nvidia = { 17 | 18 | # modesetting.enable = lib.mkDefault true; 19 | 20 | powerManagement.finegrained = lib.mkDefault true; 21 | 22 | prime = { 23 | intelBusId = "PCI:0:2:0"; 24 | nvidiaBusId = "PCI:1:0:0"; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /tuxedo/aura/15/gen1/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../../../common/cpu/amd 5 | ../../../../common/pc/laptop 6 | ../../../../common/pc/ssd 7 | ]; 8 | 9 | # Cooling management 10 | services.thermald.enable = lib.mkDefault true; 11 | 12 | # keyboard backlight lives in /sys/class/leds/rgb:kbd_backlight 13 | hardware = 14 | if lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11" then 15 | { 16 | tuxedo-drivers.enable = lib.mkDefault true; 17 | } 18 | else 19 | { 20 | tuxedo-keyboard.enable = lib.mkDefault true; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/default.nix: -------------------------------------------------------------------------------- 1 | { lib, options, ... }: 2 | { 3 | imports = [ 4 | ../../common/pc/laptop 5 | ../../common/pc/ssd 6 | ]; 7 | 8 | hardware = 9 | lib.mkDefault { 10 | bluetooth.enable = true; 11 | } 12 | # Enable TUXEDO's kernel drivers if they are available 13 | // lib.optionalAttrs (options.hardware ? tuxedo-drivers) { 14 | tuxedo-drivers.enable = true; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/gen9-intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | warnings = [ 3 | '' 4 | DEPRECATED: The module has been renamed to 5 | 6 | The gen9-intel module will be removed in a future release. 7 | '' 8 | ]; 9 | 10 | imports = [ ../pro14/gen9/intel ]; 11 | } 12 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/pro14/gen7/README.md: -------------------------------------------------------------------------------- 1 | # [TUXEDO InfinityBook Pro 14 - Gen7](https://www.tuxedocomputers.com/de/TUXEDO-InfinityBook-Pro-14-Gen7.tuxedo) 2 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/pro14/gen7/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../. 6 | ../../../../common/cpu/intel 7 | ]; 8 | 9 | # Cooling management 10 | services.thermald.enable = lib.mkDefault true; 11 | } 12 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/pro14/gen9/README.md: -------------------------------------------------------------------------------- 1 | # [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](https://www.tuxedocomputers.com/en/TUXEDO-InfinityBook-Pro-14-Gen9-INTEL) 2 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/pro14/gen9/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: { 2 | imports = [ 3 | ../../. 4 | ]; 5 | 6 | # Add Motorcomm YT6801 Driver if available 7 | boot.extraModulePackages = with config.boot; lib.lists.optional 8 | ( kernelPackages ? yt6801 ) kernelPackages.yt6801; 9 | } 10 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/pro14/gen9/intel/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ../. 4 | ../../../../../common/cpu/intel 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /tuxedo/infinitybook/v4/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | boot.kernelParams = [ 3 | "i8042.reset" 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /tuxedo/pulse/14/gen3/README.md: -------------------------------------------------------------------------------- 1 | # TUXEDO Pulse 14 - Gen3 2 | 3 | ## About 4 | 5 | [NixOS hardware configuration](https://github.com/NixOS/nixos-hardware) for 6 | [TUXEDO Pulse 14 - 7 | Gen3](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-14-Gen3). 8 | 9 | ## Troubleshooting 10 | 11 | ### Shutdown and Power Issues 12 | 13 | With the Linux Kernel version `6.6.33` (NixOS 24.05) there are shutdown issues resulting in the battery not turning off 14 | completely. Apparently a newer Kernel (tested with `6.6.35`) fixes this (the exact version where this problem is fixed is unknown). 15 | This `default.nix` will upgrade to the `pkgs.linuxPackages_latest` if the kernel is older than `6.6.35`. 16 | -------------------------------------------------------------------------------- /tuxedo/pulse/15/gen2/README.md: -------------------------------------------------------------------------------- 1 | # TUXEDO Pulse 15 - Gen2 2 | 3 | ## About 4 | 5 | [NixOS hardware configuration](https://github.com/NixOS/nixos-hardware) for 6 | [TUXEDO Pulse 15 - 7 | Gen2](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-15-Gen2.tuxedo). 8 | -------------------------------------------------------------------------------- /tuxedo/pulse/15/gen2/default.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: { 2 | imports = [ 3 | ../../../../common/cpu/amd 4 | ../../../../common/gpu/amd 5 | ../../../../common/pc/ssd 6 | ]; 7 | 8 | services.udev.extraRules = builtins.concatStringsSep "\n" ( 9 | ["# Properly suspend the system."] 10 | ++ ( 11 | map 12 | (device: ''SUBSYSTEM=="pci", ACTION=="add", ATTR{vendor}=="0x144d", ATTR{device}=="${device}", RUN+="${pkgs.runtimeShell} -c 'echo 0 > /sys/bus/pci/devices/$kernel/d3cold_allowed'"'') 13 | ["0xa80a" "0xa808"] 14 | ) 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /xiaomi/fix-boot-quirk.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | # Required fix to allow booting NixOS on certain Xiaomi laptops 4 | # https://discourse.nixos.org/t/system-wont-boot-path-efi-stub/29212/12 5 | boot.kernelPatches = lib.singleton { 6 | name = "Fix boot"; 7 | patch = null; 8 | extraStructuredConfig = with lib.kernel; { 9 | ACPI_DEBUG = yes; 10 | }; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /xiaomi/redmibook/16-pro-2024/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../fix-boot-quirk.nix 5 | ../../../common/cpu/intel 6 | ../../../common/pc/laptop 7 | ../../../common/pc/ssd 8 | ]; 9 | 10 | hardware.enableRedistributableFirmware = lib.mkDefault true; 11 | 12 | services.thermald.enable = lib.mkDefault true; 13 | } 14 | --------------------------------------------------------------------------------