From 9ad0793b40b687a4b63182cabd7827cc5a76f532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 20 May 2023 02:48:09 +0200 Subject: [PATCH] nixos/podman: persist timer otherwise the timer might never run on laptops which could be shutdown during the night --- nixos/modules/virtualisation/podman/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/virtualisation/podman/default.nix b/nixos/modules/virtualisation/podman/default.nix index c3fae4bac41b..ec0b713e58b3 100644 --- a/nixos/modules/virtualisation/podman/default.nix +++ b/nixos/modules/virtualisation/podman/default.nix @@ -206,6 +206,11 @@ in systemd.user.sockets.podman.wantedBy = [ "sockets.target" ]; + systemd.timers.podman-prune.timerConfig = lib.mkIf cfg.autoPrune.enable { + Persistent = true; + RandomizedDelaySec = 1800; + }; + systemd.tmpfiles.packages = [ # The /run/podman rule interferes with our podman group, so we remove # it and let the systemd socket logic take care of it.