feat: replace watchtower with podman auto-update
This commit is contained in:
parent
59d27f4367
commit
7beebf6a6a
3 changed files with 23 additions and 24 deletions
virtualisation
|
@ -1,11 +1,31 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ podman-compose ];
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.podman.dockerCompat = true;
|
||||
virtualisation.podman.dockerSocket.enable = true;
|
||||
virtualisation.podman.extraPackages = with pkgs; [ ];
|
||||
virtualisation.podman.defaultNetwork.settings.dns_enabled = true;
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue