From 6a19f6b249c1e2182c13e3508151842ee00af426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ryan4yin=20=7C=20=E4=BA=8C=E8=8A=B1?= Date: Mon, 12 Oct 2026 00:29:12 +0800 Subject: [PATCH] fix(desktop): keep named podman images when pruning (#435) Assisted-by: DeepSeek Harness (deepseek-flash) --- modules/nixos/desktop/containers.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/nixos/desktop/containers.nix b/modules/nixos/desktop/containers.nix index 4c8ea779..2f80c671 100644 --- a/modules/nixos/desktop/containers.nix +++ b/modules/nixos/desktop/containers.nix @@ -36,11 +36,15 @@ # Prune the rootless store (the module's autoPrune only covered the rootful # one). Runs in the user's session, so it fires while the desktop is logged in. + # + # No `--all`: prune only dangling images, keeping rollback tags and pinned base + # images. An `until=` filter cannot do this, since these images are built with + # a fixed epoch (reproducible builds) and the filter reads that build time. systemd.user.services.podman-prune = { description = "Prune rootless podman resources"; serviceConfig = { Type = "oneshot"; - ExecStart = "${lib.getExe config.virtualisation.podman.package} system prune -f --all"; + ExecStart = "${lib.getExe config.virtualisation.podman.package} system prune -f"; }; }; systemd.user.timers.podman-prune = {