diff --git a/configuration.nix b/configuration.nix --- a/configuration.nix +++ b/configuration.nix @@ -216,16 +216,19 @@ # List services that you want to enable: # Suspend on laptop lid close - services.logind = { - logindConfig = { - HandleLidSwitch = "suspend"; - HandleLidSwitchExternalPower = "suspend"; - HandleLidSwitchDocked = "suspend"; - LidSwitchIgnoreInhibited = "no"; + powerManagement = { + enable = true; + powerDump = { + enable = true; }; }; - powerManagement.enable = true; + systemd.extraConfig = '' + HandleLidSwitch=suspend + HandleLidSwitchExternalPower=suspend + HandleLidSwitchDocked=suspend + LidSwitchIgnoreInhibited=no + ''; # Enable the OpenSSH daemon. services.openssh.enable = true;