From 8b52a21a0493f8e822f2531ebaef50e261b70116 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 24 Jan 2020 14:28:41 +0100 Subject: laptop: configure lid power actions --- system/settings/hardware/laptop.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/system/settings/hardware/laptop.nix b/system/settings/hardware/laptop.nix index aca900a6..24e7db86 100644 --- a/system/settings/hardware/laptop.nix +++ b/system/settings/hardware/laptop.nix @@ -41,10 +41,14 @@ target = "xdg/autorandr"; }; - services.logind.extraConfig = '' - IdleAction=suspend - IdleActionSec=600 - ''; + services.logind = { + lidSwitch = "suspend"; + lidSwitchExternalPower = "ignore"; + extraConfig = '' + IdleAction=suspend + IdleActionSec=600 + ''; + }; services.acpid = { enable = true; -- cgit 1.4.1