about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-06-26 18:55:32 +0200
committerProfpatsch <mail@profpatsch.de>2022-06-26 18:55:32 +0200
commit28f725ae0a3cab8e6cffeb0ea9fcec2737a1772d (patch)
tree6bd801d92140ba618f4f29ce7058df862de99408 /modules
parentd7c905b69020a46e8f549ae86b77eb884f89ed68 (diff)
modules/hardware/thinkpad: Explicit lib
Yay static linting.
Diffstat (limited to 'modules')
-rw-r--r--modules/hardware/thinkpad.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/hardware/thinkpad.nix b/modules/hardware/thinkpad.nix
index f296c5d6..189ccc98 100644
--- a/modules/hardware/thinkpad.nix
+++ b/modules/hardware/thinkpad.nix
@@ -1,29 +1,26 @@
 { lib, config, pkgs, ... }:
-
-with lib;
-
 let
   cfg = config.vuizvui.hardware.thinkpad;
 
 in
 {
   options.vuizvui.hardware.thinkpad = {
-    enable = mkEnableOption "thinkpad support";
+    enable = lib.mkEnableOption "thinkpad support";
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
 
     # We need to update the Intel microcode on every update,
     # otherwise there can be problems with newers kernels.
-    hardware.cpu.intel.updateMicrocode = mkDefault true;
+    hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
 
     # read acpi stats (e.g. battery)
     environment.systemPackages = [ pkgs.acpi ];
 
     # for wifi
-    hardware.enableRedistributableFirmware = mkDefault true;
+    hardware.enableRedistributableFirmware = lib.mkDefault true;
 
-    hardware.trackpoint = mkDefault {
+    hardware.trackpoint = lib.mkDefault {
       enable = true;
       emulateWheel = true;
       speed = 250;
@@ -31,7 +28,7 @@ in
     };
 
     # TLP Linux Advanced Power Management
-    services.tlp.enable = mkDefault true;
+    services.tlp.enable = lib.mkDefault true;
     boot = {
       # acpi_call is required for some tlp features, e.g. discharge/recalibrate
       kernelModules = [