2023-08-10 12:46:51 +02:00
|
|
|
{ pkgs, ... }:
|
2022-08-08 23:41:47 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
environment.systemPackages = with pkgs; [ podman-compose ];
|
|
|
|
|
|
|
|
virtualisation.podman.enable = true;
|
|
|
|
virtualisation.podman.dockerCompat = true;
|
2023-05-31 17:25:46 +02:00
|
|
|
virtualisation.podman.defaultNetwork.settings.dns_enabled = true;
|
2023-08-10 12:46:51 +02:00
|
|
|
|
|
|
|
virtualisation.podman.autoPrune.enable = true;
|
|
|
|
virtualisation.podman.autoPrune.dates = "weekly";
|
|
|
|
virtualisation.podman.autoPrune.flags = [ "--all" ];
|
|
|
|
|
|
|
|
systemd.services.podman-auto-update = {
|
|
|
|
wants = [ "network-online.target" ];
|
|
|
|
after = [ "network-online.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
ExecStart = "${pkgs.podman}/bin/podman auto-update";
|
|
|
|
ExecStartPost = "${pkgs.podman}/bin/podman image prune -f";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.timers.podman-auto-update = {
|
|
|
|
wantedBy = [ "timers.target" ];
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "03:30";
|
|
|
|
Persistent = true;
|
|
|
|
};
|
|
|
|
};
|
2022-08-08 23:41:47 +02:00
|
|
|
}
|