extract ssh idle sleep/shutdown configuration
1 file changed, 4 insertions(+), 13 deletions(-)
changed files
M system/roles/ci-runner.nix → system/roles/ci-runner.nix
@@ -4,23 +4,14 @@ pkgs, ... }: { + imports = [ + ../settings/configuration/ssh-inhibit-idle.nix + ]; + services.logind.settings.Login = { IdleAction = "poweroff"; IdleActionSec = "1 hour"; StopIdleSessionSec = "15 min"; - }; - - 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 - ''; }; users.groups.laminar = { };