From ef3feef6db9c7fc4218d2a34974c0334a68a3229 Mon Sep 17 00:00:00 2001 From: oddlama Date: Sat, 11 Feb 2023 15:16:57 +0100 Subject: [PATCH] feat: use tlp instead of powertop --- hosts/nom/default.nix | 7 ------- hosts/ward/default.nix | 5 ----- modules/laptop.nix | 30 ++++++++++++++++-------------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/hosts/nom/default.nix b/hosts/nom/default.nix index dace26a..635a09d 100644 --- a/hosts/nom/default.nix +++ b/hosts/nom/default.nix @@ -28,16 +28,9 @@ ]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; - environment.systemPackages = with pkgs; [wireguard-tools powertop]; hardware = { video.hidpi.enable = true; opengl.enable = true; }; - - services = { - fwupd.enable = true; - smartd.enable = true; - thermald.enable = true; - }; } diff --git a/hosts/ward/default.nix b/hosts/ward/default.nix index 7021666..6252fec 100644 --- a/hosts/ward/default.nix +++ b/hosts/ward/default.nix @@ -21,11 +21,6 @@ boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; - services = { - fwupd.enable = true; - smartd.enable = true; - }; - services.home-assistant = { enable = true; extraComponents = ["default_config" "met" "zha"]; diff --git a/modules/laptop.nix b/modules/laptop.nix index a9fbc6f..84587b5 100644 --- a/modules/laptop.nix +++ b/modules/laptop.nix @@ -1,17 +1,19 @@ {pkgs, ...}: { - environment.systemPackages = with pkgs; [powertop]; - services.physlock.enable = true; - services.logind = { - lidSwitch = "ignore"; - lidSwitchDocked = "ignore"; - lidSwitchExternalPower = "ignore"; - extraConfig = '' - HandlePowerKey=suspend - HandleSuspendKey=suspend - HandleHibernateKey=suspend - PowerKeyIgnoreInhibited=yes - SuspendKeyIgnoreInhibited=yes - HibernateKeyIgnoreInhibited=yes - ''; + services = { + tlp.enable = true; + physlock.enable = true; + logind = { + lidSwitch = "ignore"; + lidSwitchDocked = "ignore"; + lidSwitchExternalPower = "ignore"; + extraConfig = '' + HandlePowerKey=suspend + HandleSuspendKey=suspend + HandleHibernateKey=suspend + PowerKeyIgnoreInhibited=yes + SuspendKeyIgnoreInhibited=yes + HibernateKeyIgnoreInhibited=yes + ''; + }; }; }