Before I go and implement this myself, does anyone happen to have a nixos module in their config that configures their laptop such that it does not suspend when the lid is closed if it is on AC wall power?
This works, but only as long as I’m logged in. Being in the process of repurposing an old Laptop to serve as home cloud, this is not sufficient. Any other options?
I needed to do this below. I don’t think services.logind.lidSwitchExternalPower was doing anything for me. After below (and a restart seemed necessary), I can ssh in after hours of idle time. Plus, I can do sudo reboot from an ssh session, it will end my session, the laptop will reboot, and then I can ssh back in a minute or two later.: