From 6881b440b6e147025eef1da2b5991d13708c5965 Mon Sep 17 00:00:00 2001 From: Jasper Chan Date: Mon, 6 Nov 2023 21:58:30 -0800 Subject: [PATCH] add support for stop_grace_period --- src/nix/modules/service/docker-compose-service.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nix/modules/service/docker-compose-service.nix b/src/nix/modules/service/docker-compose-service.nix index c038ac6..3c60ee3 100644 --- a/src/nix/modules/service/docker-compose-service.nix +++ b/src/nix/modules/service/docker-compose-service.nix @@ -297,6 +297,11 @@ in default = null; description = serviceRef "stop_signal"; }; + service.stop_grace_period = mkOption { + type = nullOr str; + default = null; + description = serviceRef "stop_grace_period"; + }; service.sysctls = mkOption { type = attrsOf (either str int); default = {}; @@ -380,6 +385,8 @@ in inherit (config.service) restart; } // lib.optionalAttrs (config.service.stop_signal != null) { inherit (config.service) stop_signal; + } // lib.optionalAttrs (config.service.stop_grace_period != null) { + inherit (config.service) stop_grace_period; } // lib.optionalAttrs (config.service.tmpfs != []) { inherit (config.service) tmpfs; } // lib.optionalAttrs (config.service.tty != null) {