summaryrefslogtreecommitdiff
path: root/trivionomicon/modules/thinkpad/sys.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2025-08-24 15:48:29 -0600
committerAlejandro Soto <alejandro@34project.org>2025-08-24 15:48:29 -0600
commitecab16d635554150627403675642d5603ef64cc6 (patch)
treef94619061973fc0a5fd6097e27e80a5dde627fda /trivionomicon/modules/thinkpad/sys.nix
parent0e11a692f223b268ca0d208b0ebf48c80caddfb6 (diff)
parent53a923158861a9c52b86f37d826c3f4637476dfa (diff)
Add 'trivionomicon/' from commit 'c651b8c4706cfc750303db12ae19e58164a6bebb'
git-subtree-dir: trivionomicon git-subtree-mainline: 02d3ab9583983e823909020c34b9d5a6894fb773 git-subtree-split: c651b8c4706cfc750303db12ae19e58164a6bebb
Diffstat (limited to 'trivionomicon/modules/thinkpad/sys.nix')
-rw-r--r--trivionomicon/modules/thinkpad/sys.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/trivionomicon/modules/thinkpad/sys.nix b/trivionomicon/modules/thinkpad/sys.nix
new file mode 100644
index 0000000..bc96146
--- /dev/null
+++ b/trivionomicon/modules/thinkpad/sys.nix
@@ -0,0 +1,30 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}: {
+ # For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI.
+ # See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Suspend_issues
+ # Fingerprint sensor requires a firmware-update to work.
+
+ boot = {
+ extraModulePackages = with config.boot.kernelPackages; [acpi_call];
+ extraModprobeConfig = "options iwlwifi 11n_disable=1 wd_disable=1";
+
+ # acpi_call makes tlp work for newer thinkpads
+ kernelModules = ["acpi_call"];
+
+ # Force use of the thinkpad_acpi driver for backlight control.
+ # This allows the backlight save/load systemd service to work.
+ kernelParams = ["acpi_backlight=native"];
+ };
+
+ hardware.firmware = [pkgs.sof-firmware];
+
+ services = {
+ fprintd.enable = lib.mkDefault true;
+ thinkfan.enable = lib.mkDefault true;
+ tp-auto-kbbl.enable = lib.mkDefault true;
+ };
+}