{ pkgs, ... }: { services.openssh.startWhenNeeded = true; systemd.services."ssh-inhibit-idle@" = { bindsTo = [ "sshd@%i.service" ]; wantedBy = [ "sshd@.service" ]; serviceConfig.ExecStart = '' ${pkgs.systemd}/bin/systemd-inhibit \ --mode block --what idle \ --who 'ssh session '%I \ --why 'session still active' \ ${pkgs.coreutils}/bin/sleep infinity ''; }; }