about summary refs log tree commit diff
path: root/users/tazjin/nixos/khamovnik/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@tvl.su>2024-09-03T13·44+0300
committertazjin <tazjin@tvl.su>2024-09-03T22·26+0000
commit632e74e4357f371446678d177fe578fd3c193836 (patch)
tree4435544eb740046efe3e27825dfff3838998e633 /users/tazjin/nixos/khamovnik/default.nix
parent1c898f7ddc5b3ad223d73972465c9fee206c9815 (diff)
fix(tazjin/khamovnik): try to force suspend on all lid close events r/8648
logind doesn't like reliably suspending, and apparently it has a bunch of bugs
around dock detection (I don't even use docks), but maybe this helps

Change-Id: Ia822799cde838d8d41a67f9d39d59d1fa0306116
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12429
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'users/tazjin/nixos/khamovnik/default.nix')
-rw-r--r--users/tazjin/nixos/khamovnik/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/users/tazjin/nixos/khamovnik/default.nix b/users/tazjin/nixos/khamovnik/default.nix
index 9f92bcbc7dc5..27d7536bb1de 100644
--- a/users/tazjin/nixos/khamovnik/default.nix
+++ b/users/tazjin/nixos/khamovnik/default.nix
@@ -117,6 +117,13 @@ in
   # Try to work around Intel CPU throttling bugs
   services.throttled.enable = true;
 
+  # Try to get suspend to work more reliably
+  services.logind = {
+    lidSwitch = "suspend";
+    lidSwitchDocked = "suspend";
+    lidSwitchExternalPower = "suspend";
+  };
+
   virtualisation.docker.enable = true;
 
   hardware.bluetooth.enable = true;