Add role for zrepl.
This commit is contained in:
parent
dbf3f2e983
commit
ce9140aa73
@ -24,6 +24,7 @@
|
|||||||
./roles/network
|
./roles/network
|
||||||
./roles/firewall
|
./roles/firewall
|
||||||
./roles/zsh
|
./roles/zsh
|
||||||
|
./roles/zrepl
|
||||||
./roles/graphics
|
./roles/graphics
|
||||||
./roles/sound
|
./roles/sound
|
||||||
./roles/sway
|
./roles/sway
|
||||||
|
45
nix/configuration/roles/zrepl/default.nix
Normal file
45
nix/configuration/roles/zrepl/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
services.zrepl = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
jobs = [
|
||||||
|
{
|
||||||
|
name = "snapjob";
|
||||||
|
type = "snap";
|
||||||
|
filesystems = {
|
||||||
|
"zroot/linux/nix/persist<" = true;
|
||||||
|
"zroot/bridge<" = true;
|
||||||
|
};
|
||||||
|
snapshotting = {
|
||||||
|
type = "periodic";
|
||||||
|
interval = "15m";
|
||||||
|
prefix = "zrepl_";
|
||||||
|
};
|
||||||
|
pruning = {
|
||||||
|
keep = [
|
||||||
|
{
|
||||||
|
type = "grid";
|
||||||
|
grid = "1x1h(keep=all) | 24x1h | 14x1d";
|
||||||
|
regex = "^zrepl_.*";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "regex";
|
||||||
|
negate = true;
|
||||||
|
regex = "^zrepl_.*";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user