diff --git a/system/nixos/container.nix b/system/nixos/container.nix index fa907d4..b23c205 100644 --- a/system/nixos/container.nix +++ b/system/nixos/container.nix @@ -15,7 +15,7 @@ autoPrune = { enable = true; dates = "weekly"; - flags = [ "--all" ]; + flags = [ "--all" "--filter=label!=io.kempkens.keepImage" ]; }; }; @@ -55,7 +55,7 @@ { Type = "oneshot"; ExecStart = "${podman}/bin/podman auto-update"; - ExecStartPost = "${podman}/bin/podman image prune -f"; + ExecStartPost = "${podman}/bin/podman image prune -f --filter=label!=io.kempkens.keepImage"; }; }; } diff --git a/system/nixos/forgejo-runner.nix b/system/nixos/forgejo-runner.nix index f067b7b..bc27c8f 100644 --- a/system/nixos/forgejo-runner.nix +++ b/system/nixos/forgejo-runner.nix @@ -56,7 +56,7 @@ in NSSWITCH tar -cv . | tar -tvf - - tar -cv . | podman import - forgejo-runner-nix + tar -cv . | podman import --change "LABEL io.kempkens.keepImage=true" - forgejo-runner-nix ''; serviceConfig = { RuntimeDirectory = "forgejo-runner-nix-image";