summary refs log tree commit diff
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2022-04-07 18:39:48 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2022-04-09 20:11:12 -0300
commit6729653309e636401ea880acffa17866f18f320d (patch)
tree1cf0967482f2e7db4082b40f514443516f65471a
parent60158bfc22a50d90919ee647b3a36e4f5f255428 (diff)
downloadnixpkgs-6729653309e636401ea880acffa17866f18f320d.tar
nixpkgs-6729653309e636401ea880acffa17866f18f320d.tar.gz
nixpkgs-6729653309e636401ea880acffa17866f18f320d.tar.bz2
nixpkgs-6729653309e636401ea880acffa17866f18f320d.tar.lz
nixpkgs-6729653309e636401ea880acffa17866f18f320d.tar.xz
nixpkgs-6729653309e636401ea880acffa17866f18f320d.tar.zst
nixpkgs-6729653309e636401ea880acffa17866f18f320d.zip
nixos/shellhub-agent: allow setting the keepAliveInterval
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--nixos/modules/services/networking/shellhub-agent.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/shellhub-agent.nix b/nixos/modules/services/networking/shellhub-agent.nix
index d4344272988..fa237a44d69 100644
--- a/nixos/modules/services/networking/shellhub-agent.nix
+++ b/nixos/modules/services/networking/shellhub-agent.nix
@@ -23,6 +23,16 @@ in
         '';
       };
 
+      keepAliveInterval = mkOption {
+        type = types.int;
+        default = 30;
+        description = ''
+          Determine the interval to send the keep alive message to
+          the server. This has a direct impact of the bandwidth
+          used by the device.
+        '';
+      };
+
       tenantId = mkOption {
         type = types.str;
         example = "ba0a880c-2ada-11eb-a35e-17266ef329d6";
@@ -71,6 +81,7 @@ in
       environment.SHELLHUB_SERVER_ADDRESS = cfg.server;
       environment.SHELLHUB_PRIVATE_KEY = cfg.privateKey;
       environment.SHELLHUB_TENANT_ID = cfg.tenantId;
+      environment.SHELLHUB_KEEPALIVE_INTERVAL = toString cfg.keepAliveInterval;
 
       serviceConfig = {
         # The service starts sessions for different users.