summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/pc/laptop/default.nix9
1 files changed, 3 insertions, 6 deletions
diff --git a/common/pc/laptop/default.nix b/common/pc/laptop/default.nix
index 5da1e60..ebc4931 100644
--- a/common/pc/laptop/default.nix
+++ b/common/pc/laptop/default.nix
@@ -1,16 +1,13 @@
-{ lib, ... }:
+{ config, lib, ... }:
{
imports = [ ../. ];
- boot.kernel.sysctl = {
- "vm.laptop_mode" = lib.mkDefault 5;
- };
-
# TODO: fix in NixOS/nixpkgs
# Disable governor set in hardware-configuration.nix,
# required when services.tlp.enable is true:
- powerManagement.cpuFreqGovernor = lib.mkForce null;
+ powerManagement.cpuFreqGovernor =
+ lib.mkIf config.services.tlp.enable (lib.mkForce null);
services.tlp.enable = lib.mkDefault true;
}