2023-03-01 05:08:07 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
volumeConfig = (subvolumes: {
|
|
|
|
snapshot_dir = "@snapshots";
|
|
|
|
subvolume = builtins.foldl'
|
|
|
|
(acc: subvol: acc // {
|
|
|
|
${subvol} = { };
|
|
|
|
})
|
|
|
|
{ }
|
|
|
|
subvolumes;
|
|
|
|
});
|
|
|
|
in
|
|
|
|
{
|
2023-12-13 20:13:07 +00:00
|
|
|
services.btrbk = {
|
2023-03-01 05:08:07 +00:00
|
|
|
sshAccess = [
|
|
|
|
{
|
|
|
|
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHTqU3EvTgY5/e9m6YyQWypQPK58t9iPmPnPYAvnODGB asonix@lionheart";
|
|
|
|
roles = [ "source" "info" "send" ];
|
|
|
|
}
|
|
|
|
];
|
2023-08-11 18:01:24 +00:00
|
|
|
instances = {
|
|
|
|
btrbk = {
|
|
|
|
onCalendar = "hourly";
|
|
|
|
settings = {
|
|
|
|
snapshot_preserve_min = "2d";
|
|
|
|
snapshot_preserve = "7d 5w";
|
|
|
|
transaction_log = "/var/log/btrbk.log";
|
|
|
|
volume = {
|
2024-05-06 03:17:53 +00:00
|
|
|
"/btrfs/nvme1" = volumeConfig [
|
|
|
|
"@"
|
|
|
|
"@development"
|
2023-08-11 18:01:24 +00:00
|
|
|
"@documents"
|
|
|
|
"@downloads"
|
2024-05-06 03:17:53 +00:00
|
|
|
"@home"
|
|
|
|
"@instantupload"
|
2023-08-11 18:01:24 +00:00
|
|
|
"@music"
|
2024-05-06 03:17:53 +00:00
|
|
|
"@notes"
|
|
|
|
"@photos"
|
|
|
|
"@root"
|
2023-08-11 18:01:24 +00:00
|
|
|
"@videos"
|
|
|
|
];
|
|
|
|
};
|
2023-03-01 05:08:07 +00:00
|
|
|
};
|
|
|
|
};
|
2023-08-11 18:01:24 +00:00
|
|
|
games = {
|
|
|
|
onCalendar = "hourly";
|
|
|
|
settings = {
|
|
|
|
snapshot_preserve_min = "1h";
|
|
|
|
snapshot_preserve = "2h 2d";
|
|
|
|
transaction_log = "/var/log/btrbk-games.log";
|
|
|
|
volume = {
|
2024-05-06 03:17:53 +00:00
|
|
|
"/btrfs/nvme1" = volumeConfig [ "@games" ];
|
2023-08-11 18:01:24 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-03-01 05:08:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|