Skip to content

Commit

Permalink
chore(gitserver): add backup service
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenhoenle committed Oct 20, 2024
1 parent cad9115 commit 496f3a2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
ruben.paperless.enable = true;
ruben.minecraft.enable = true;
ruben.gitserver.enable = true;
ruben.soft-serve = {
enable = true;
restoreBackup = true;
};
#ruben.soft-serve = {
# enable = true;
# restoreBackup = true;
#};
ruben.phone-backup.enable = true;
ruben.fileserver.enable = true;

Expand Down
24 changes: 24 additions & 0 deletions services/gitserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@
X11Forwarding no
'';
};

/* backup service */
services.restic.backups.gitserver = {
user = "git";
initialize = true;
passwordFile = config.age.secrets.resticPassword.path;
repository = "s3:https://s3.eu-central-003.backblazeb2.com/nixos-server-restic-backup/services/gitserver";
environmentFile = config.age.secrets.backblazeB2ResticS3EnvironmentSecrets.path;
paths = [
"/var/lib/git-server"
];
pruneOpts = [
"--keep-hourly 48"
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 12"
"--keep-yearly 3"
];
extraOptions = [ "s3.region=eu-central-003" ];
timerConfig = {
OnCalendar = "hourly";
Persistent = true;
};
};
};
}

0 comments on commit 496f3a2

Please sign in to comment.