Keep routers and the installer running with the lid closed

logind suspends laptops on lid close by default; a router (and an install
in progress) must keep running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
2026-10-29 09:42:27 +01:00
co-authored by Claude Opus 5.5
parent b12bb5aa51
commit 8f65587f99
3 changed files with 20 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# A router keeps routing with the lid shut: laptops make fine routers, but
# logind suspends them on lid close by default.
{ config, lib, ... }:
{
config = lib.mkIf config.router.enable {
services.logind.settings.Login = {
HandleLidSwitch = "ignore";
HandleLidSwitchExternalPower = "ignore";
HandleLidSwitchDocked = "ignore";
};
};
}