Configure borg backup for gitea

This commit is contained in:
Amanda Graven 2023-06-17 17:16:59 +02:00
parent e21bba4363
commit 69f780a9f2
Signed by: amanda
GPG key ID: F747582C5608F4CB
8 changed files with 21 additions and 4 deletions

View file

@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH+ZQk80BU/OdQfV990yrkFwvsLVbVZ2Itof/qwxjTn7 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG4C5OgZpxoF42L5rPqwejs+Q1ViN9TM9o/fEbpnPFtA

View file

@ -7,6 +7,7 @@
../../common/services/tailscale.nix ../../common/services/tailscale.nix
../../common/users.nix ../../common/users.nix
./services/acme.nix ./services/acme.nix
./services/borg.nix
./services/coturn.nix ./services/coturn.nix
./services/nginx.nix ./services/nginx.nix
./services/nitter.nix ./services/nitter.nix

Binary file not shown.

View file

@ -0,0 +1,16 @@
{ config, ... }:
{
services.borgbackup.jobs = {
gitea = {
paths = "/var/lib/gitea";
repo = "ssh://borg@despondos.nao.sh//mnt/slab/backup/wind/gitea";
encryption.mode = "repokey";
encryption.passCommand = "cat ${config.secrets.files.borg_pass_gitea.file}";
environment.BORG_RSH = "ssh -i ${config.secrets.files.ssh_key_gitea.file}";
compression = "auto,zstd";
startAt = "*-*-* 02:15:00";
user = "gitea";
};
};
}

View file

@ -3,9 +3,6 @@
{ {
services.gitea = { services.gitea = {
enable = true; enable = true;
domain = "git.graven.dev";
rootUrl = "https://git.graven.dev";
enableUnixSocket = true;
appName = "Graven Gitea"; appName = "Graven Gitea";
settings = { "ui" = { "DEFAULT_THEME" = "arc-green"; }; }; settings = { "ui" = { "DEFAULT_THEME" = "arc-green"; }; };
database = { database = {
@ -13,5 +10,8 @@
}; };
settings.service.DISABLE_REGISTRATION = true; settings.service.DISABLE_REGISTRATION = true;
settings.session.COOKIE_SECURE = true; settings.session.COOKIE_SECURE = true;
settings.server.DOMAIN = "git.graven.dev";
settings.server.ROOT_URL = "https://git.graven.dev";
settings.server.PROTOCOL = "http+unix";
}; };
} }