From 5a00ea423a39b66dff032a03973932ab4f18af91 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Wed, 27 Dec 2017 07:46:06 +0000 Subject: common/pc/laptop: drop explicit vm.laptop_mode This is handled by TLP, so we don't need to set that explicitly. --- common/pc/laptop/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'common') 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; } -- cgit v1.2.3