diff --git a/applications/gitlab.nix b/applications/gitlab.nix index 36b2aae..e0fe3e0 100644 --- a/applications/gitlab.nix +++ b/applications/gitlab.nix @@ -178,6 +178,10 @@ in { domain = lib.mkForce domain_base; }; + services.skynet_backup.normal.backups = [ + "/etc/skynet/backups/gitlab" + ]; + services.gitlab = { enable = true; @@ -213,6 +217,14 @@ in { }; }; + # see https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/gitlab.nix#L295 + backup = { + startAt = "Sat *-*-* 04:00:00"; # Sat 4am weekly + path = "/etc/skynet/backups/gitlab"; # Has to be same as line 182 + keepTime = 2190; # 3 months(hours) - 12 backups untill the first one gets deleted + skip = ["builds" "artifacts" "registry" "packages" "terraform_state"]; # see https://docs.gitlab.com/ee/administration/backup_restore/backup_gitlab.html#excluding-specific-data-from-the-backup + }; + # use the local email client smtp.enable = true;