Spindle has an issue where it sometimes (particularly after failures) leaks docker resources. Therefore, we should prune them. We shouldn't prune images automatically because these are commonly used between workflows, so we need to override the autoprune service to only prune the stuff we want...
+15
-1
packetmix/systems/midnight/spindle.nix
+15
-1
packetmix/systems/midnight/spindle.nix
···
2
2
#
3
3
# SPDX-License-Identifier: MIT
4
4
5
-
{ project, ... }:
5
+
{
6
+
project,
7
+
pkgs,
8
+
lib,
9
+
...
10
+
}:
6
11
{
7
12
imports = [ project.inputs.tangled.result.nixosModules.spindle ];
8
13
···
19
24
pipelines.workflowTimeout = "2h";
20
25
};
21
26
27
+
virtualisation.docker.autoPrune = {
28
+
enable = true;
29
+
dates = "hourly";
30
+
};
31
+
systemd.services.docker-prune.serviceConfig.ExecStart = lib.mkForce ''
32
+
${pkgs.docker}/bin/docker network prune -f ;\
33
+
${pkgs.docker}/bin/docker container prune -f
34
+
'';
35
+
22
36
clicks.storage.impermanence.persist.directories = [
23
37
"/var/lib/docker"
24
38
"/var/lib/spindle"