mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-01-18 21:29:33 +01:00
40 lines
831 B
Nix
40 lines
831 B
Nix
{ config, ... }:
|
|
{
|
|
sops.secrets.borgRepoPassword = { };
|
|
|
|
services.borgbackup.jobs = {
|
|
localBackup = {
|
|
paths = "/";
|
|
exclude = [
|
|
"/nix"
|
|
"/srv/Multimedia"
|
|
"/srv/media"
|
|
"/srv/backups/serverBackups"
|
|
];
|
|
repo = "/srv/backups/serverBackups";
|
|
doInit = true;
|
|
encryption = {
|
|
mode = "repokey";
|
|
passCommand = "cat /run/secrets/borgRepoPassword";
|
|
};
|
|
compression = "auto,lzma";
|
|
startAt = "weekly";
|
|
};
|
|
|
|
/*
|
|
serverBackup = {
|
|
|
|
};
|
|
*/
|
|
};
|
|
|
|
services.borgbackup.repos = {
|
|
borgPersonalServer = {
|
|
authorizedKeys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHyeTAANyYqMFded6mJHWuhGVXROu3TqDV2b8icjolfO root@meowcats-silly-computer"
|
|
];
|
|
path = "/srv/backups/localComputerBackups";
|
|
};
|
|
};
|
|
}
|