nullbox: setup backups for minecraft server
This commit is contained in:
parent
797421666b
commit
758c40155b
30
hosts/nullbox/backup.nix
Normal file
30
hosts/nullbox/backup.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
secret = name: config.age.secrets."${name}".path;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
age.secrets.restic-rclone.file = ../../secrets/restic-rclone.age;
|
||||||
|
age.secrets.restic-password.file = ../../secrets/restic-password.age;
|
||||||
|
services.restic.backups.system = {
|
||||||
|
rcloneConfigFile = secret "restic-rclone";
|
||||||
|
passwordFile = secret "restic-password";
|
||||||
|
repository = "rclone:restic:";
|
||||||
|
exclude = [
|
||||||
|
".snapshots"
|
||||||
|
];
|
||||||
|
paths = [
|
||||||
|
"/srv/mcserver"
|
||||||
|
];
|
||||||
|
dynamicFilesFrom = ''
|
||||||
|
echo
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraBackupArgs = [
|
||||||
|
"--tag=auto"
|
||||||
|
"--group-by=host,tag"
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -15,6 +15,8 @@
|
|||||||
./mcserver.nix
|
./mcserver.nix
|
||||||
|
|
||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
|
|
||||||
|
./backup.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user