summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-27 07:46:06 +0000
committerYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-27 07:46:06 +0000
commit5a00ea423a39b66dff032a03973932ab4f18af91 (patch)
tree1f1f112621aa497a9016047c7d280ab3452bccd1 /common
parentb1304963c8c296ee20918a3604f2d92227b1a868 (diff)
common/pc/laptop: drop explicit vm.laptop_mode
This is handled by TLP, so we don't need to set that explicitly.
Diffstat (limited to 'common')
-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;
}