I’m using an old laptop as a home server. It cuts (at least) the network connection when I close the lid without being logged in.
I’ve tried using
systemd.targets.sleep.enable = false;
services.logind.lidSwitch = "ignore";
and successfully kept the device from going to sleep. But, as you can imagine, the network cut is quite the issue.
I know of hacks like enabling auto-login, but I’m not ready to do this as (as far as I understand) that’ll let anyone with physical access to the machine use it. Sure, I could create a useless dummy user, but frankly, there must be a better way. Know of any?