diff options
-rw-r--r-- | modules/hardware/thinkpad.nix | 15 |
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 = [ |