diff --git a/modules/pihole-container.factory.nix b/modules/pihole-container.factory.nix index acf2fb7..e5d73e3 100644 --- a/modules/pihole-container.factory.nix +++ b/modules/pihole-container.factory.nix @@ -340,10 +340,15 @@ in rec { } \ docker-archive:${piholeFlake.packages.${pkgs.system}.piholeImage} ''; - ExecStopPost = "${pkgs.coreutils}/bin/sleep 30"; #TODO check that user can control podman & has subuidmap/subgidmap set User = "${cfg.hostConfig.user}"; }; + + postStop = '' + while ${pkgs.podman}/bin/podman container exists ${cfg.hostConfig.containerName}; do + ${pkgs.coreutils-full}/bin/sleep 2; + done + ''; }; }; }