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
13 lines
364 B
Nix
13 lines
364 B
Nix
# 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";
|
|
};
|
|
};
|
|
}
|