summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/prefect.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/prefect.nix b/system/prefect.nix
index e5ebac22..1a25032e 100644
--- a/system/prefect.nix
+++ b/system/prefect.nix
@@ -123,6 +123,11 @@
     openFirewall = false;
     startWhenNeeded = true;
   };
+  systemd.services."ssh-no-sleep@" = {
+    bindsTo = [ "sshd@%i.service" ];
+    wantedBy = [ "sshd@.service" ];
+    serviceConfig.ExecStart = "${pkgs.systemd}/bin/systemd-inhibit --mode block --what sleep --who 'ssh session '%I --why 'session still active' ${pkgs.coreutils}/bin/sleep infinity";
+  };
 
   networking.nftables = {
     enable = true;