feat(oci): add auto prune

This commit is contained in:
winston 2023-07-03 03:43:57 +02:00
parent 802a6d18d3
commit c96960786f
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -6,12 +6,22 @@
}; };
websitePort = "14139"; websitePort = "14139";
in { in {
virtualisation.oci-containers.containers = { virtualisation = {
podman = {
enable = true;
autoPrune = {
enable = true;
dates = "03:30";
};
};
oci-containers = {
backend = "podman";
containers = {
faerber-bot = { faerber-bot = {
image = "ghcr.io/nekowinston/faerber/faerber-discord-bot:latest"; image = "ghcr.io/nekowinston/faerber/faerber-discord-bot:latest";
environmentFiles = [ environmentFiles = [config.age.secrets."containers/faerber.env".path];
config.age.secrets."containers/faerber.env".path
];
}; };
pepperjack = { pepperjack = {
@ -20,12 +30,8 @@ in {
TOKEN = "~"; TOKEN = "~";
OWNER = "505490445468696576"; OWNER = "505490445468696576";
}; };
environmentFiles = [ environmentFiles = [config.age.secrets."containers/pepperjack.env".path];
config.age.secrets."containers/pepperjack.env".path volumes = ["/srv/data-pepperjack:/data"];
];
volumes = [
"/srv/data-pepperjack:/data"
];
}; };
website = { website = {
@ -34,6 +40,8 @@ in {
ports = ["127.0.0.1:${websitePort}:3000"]; ports = ["127.0.0.1:${websitePort}:3000"];
}; };
}; };
};
};
services.nginx.virtualHosts."winston.sh" = { services.nginx.virtualHosts."winston.sh" = {
locations."/".proxyPass = "http://127.0.0.1:${websitePort}"; locations."/".proxyPass = "http://127.0.0.1:${websitePort}";