overhaul of backup system
This commit is contained in:
parent
2bdeadfa7a
commit
912308dced
19 changed files with 226 additions and 196 deletions
|
|
@ -5,36 +5,14 @@ in {
|
|||
file = ../secrets/hidden_service/forgejo;
|
||||
};
|
||||
|
||||
services = {
|
||||
forgejo = {
|
||||
enable = true;
|
||||
lfs.enable = false;
|
||||
settings.server = {
|
||||
DOMAIN = "git.distrust.network";
|
||||
HTTP_PORT = forgejoPort;
|
||||
ROOT_URL = "https://git.distrust.network/";
|
||||
SSH_PORT = builtins.head config.services.openssh.ports;
|
||||
};
|
||||
};
|
||||
borgbackup.jobs."forgejo" = {
|
||||
repo = "ssh://u506783@u506783.your-storagebox.de:23/./forgejo";
|
||||
environment = {
|
||||
BORG_RSH = "ssh -i ${config.age.secrets."borg_ed25519".path} -o 'StrictHostKeyChecking=no'";
|
||||
};
|
||||
paths = [
|
||||
"/var/lib/forgejo"
|
||||
];
|
||||
encryption = {
|
||||
mode = "keyfile";
|
||||
passCommand = "cat ${config.age.secrets."borg_pass".path}";
|
||||
};
|
||||
compression = "auto,lzma";
|
||||
startAt = "daily";
|
||||
prune.keep = {
|
||||
daily = 7;
|
||||
weekly = 4;
|
||||
monthly = -1;
|
||||
};
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
lfs.enable = false;
|
||||
settings.server = {
|
||||
DOMAIN = "git.distrust.network";
|
||||
HTTP_PORT = forgejoPort;
|
||||
ROOT_URL = "https://git.distrust.network/";
|
||||
SSH_PORT = builtins.head config.services.openssh.ports;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -47,5 +25,11 @@ in {
|
|||
virtualHostConfig = ''
|
||||
reverse_proxy localhost:${toString forgejoPort}
|
||||
'';
|
||||
backup = {
|
||||
enable = true;
|
||||
paths = [
|
||||
"/var/lib/forgejo"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue