From a2d0976f7f46eb2b47916098fd022d8434768c66 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Fri, 24 Mar 2023 22:30:50 +0100 Subject: [PATCH] podman: Set TimeoutStopSec --- container/matrix/default.nix | 12 ++++++++++++ container/proxitok/default.nix | 5 ++--- container/weewx/default.nix | 9 ++++++++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/container/matrix/default.nix b/container/matrix/default.nix index d112057..5771768 100644 --- a/container/matrix/default.nix +++ b/container/matrix/default.nix @@ -44,6 +44,18 @@ }; }; + systemd.services.podman-signald.serviceConfig = { + TimeoutStopSec = lib.mkForce 5; + }; + + systemd.services.podman-matrix-signal.serviceConfig = { + TimeoutStopSec = lib.mkForce 5; + }; + + systemd.services.podman-matrix-whatsapp.serviceConfig = { + TimeoutStopSec = lib.mkForce 5; + }; + networking.firewall.interfaces."podman+" = { allowedUDPPorts = [ 443 ]; allowedTCPPorts = [ 443 ]; diff --git a/container/proxitok/default.nix b/container/proxitok/default.nix index b178d69..26e4e4a 100644 --- a/container/proxitok/default.nix +++ b/container/proxitok/default.nix @@ -25,13 +25,12 @@ }; }; - # The proxitok-* container doesn't play nicely with SIGTERM systemd.services.podman-proxitok-web.serviceConfig = { - TimeoutStopSec = lib.mkForce 2; + TimeoutStopSec = lib.mkForce 5; }; systemd.services.podman-proxitok-signer.serviceConfig = { - TimeoutStopSec = lib.mkForce 2; + TimeoutStopSec = lib.mkForce 5; }; systemd.tmpfiles.rules = [ diff --git a/container/weewx/default.nix b/container/weewx/default.nix index 1b37eb6..d6f35c7 100644 --- a/container/weewx/default.nix +++ b/container/weewx/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, ... }: let secret = import ../../secret/container/weewx; @@ -20,6 +20,10 @@ in ]; }; + systemd.services.podman-weewx.serviceConfig = { + TimeoutStopSec = lib.mkForce 5; + }; + systemd.tmpfiles.rules = [ "d ${data-dir} 0755 421 421" "d ${data-dir}/html 0755 421 421" @@ -83,6 +87,9 @@ in locations."~ ^/dwd/(icons|warn_icons)/" = { root = "${data-dir}/static_html"; + extraConfig = '' + expires 7d; + ''; }; locations."~ ^/dwd/[\w]+\.(gif|png)".extraConfig = ''