Update hosts/docker/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 30m3s
Check NixOS configurations / eval-hosts (push) Failing after 30m3s
added systemd job to prune docker data
This commit is contained in:
@@ -119,6 +119,25 @@ systemd.timers.nextcloud = {
|
||||
};
|
||||
};
|
||||
|
||||
# Create nextcloud cron scheduled task
|
||||
systemd.services.docker-prune = {
|
||||
description = "Prune docker data";
|
||||
script = ''${pkgs.docker} system prune --volumes --all'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "nixos";
|
||||
};
|
||||
path = with pkgs; [ docker docker-compose ];
|
||||
};
|
||||
|
||||
systemd.timers.docker-prune = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "monthly";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
# create update task
|
||||
|
||||
# systemd.services.update-containers = {
|
||||
|
||||
Reference in New Issue
Block a user