Reformat with alejandra
This commit is contained in:
parent
7b2b5b3b80
commit
52a81ddb21
53 changed files with 764 additions and 746 deletions
|
|
@ -1,6 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
loader.grub.zfsSupport = true;
|
||||
|
|
@ -15,60 +17,71 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
logging = [{
|
||||
type = "syslog";
|
||||
level = "info";
|
||||
format = "human";
|
||||
}];
|
||||
logging = [
|
||||
{
|
||||
type = "syslog";
|
||||
level = "info";
|
||||
format = "human";
|
||||
}
|
||||
];
|
||||
};
|
||||
jobs = [
|
||||
{
|
||||
name = "snapshot";
|
||||
type = "snap";
|
||||
filesystems = { "zroot/main/home" = true; };
|
||||
filesystems = {"zroot/main/home" = true;};
|
||||
snapshotting = {
|
||||
type = "periodic";
|
||||
prefix = "zrepl-";
|
||||
interval = "1h";
|
||||
};
|
||||
pruning = {
|
||||
keep = [{
|
||||
type = "grid";
|
||||
regex = "^zrepl-.*";
|
||||
grid = lib.concatStringsSep " | " [ "1x1h(keep=all)" "24x1h" "7x1d" "4x1w" ];
|
||||
}];
|
||||
keep = [
|
||||
{
|
||||
type = "grid";
|
||||
regex = "^zrepl-.*";
|
||||
grid = lib.concatStringsSep " | " ["1x1h(keep=all)" "24x1h" "7x1d" "4x1w"];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "push-to-local-drive";
|
||||
type = "push";
|
||||
send = { encrypted = true; };
|
||||
send = {encrypted = true;};
|
||||
connect = {
|
||||
type = "local";
|
||||
listener_name = "sink-to-local-drive";
|
||||
client_identity = config.networking.hostName;
|
||||
};
|
||||
filesystems = { "zroot/main/home" = true; };
|
||||
filesystems = {"zroot/main/home" = true;};
|
||||
replication = {
|
||||
protection = {
|
||||
initial = "guarantee_resumability";
|
||||
incremental = "guarantee_incremental";
|
||||
};
|
||||
};
|
||||
snapshotting = { type = "manual"; };
|
||||
snapshotting = {type = "manual";};
|
||||
pruning = {
|
||||
keep_sender = [{ type = "regex"; regex = ".*"; }];
|
||||
keep_receiver = [{
|
||||
type = "grid";
|
||||
regex = "^zrepl-.*";
|
||||
grid = lib.concatStringsSep " | " [ "1x1h(keep=all)" "365x1d" "52x1w" ];
|
||||
}];
|
||||
keep_sender = [
|
||||
{
|
||||
type = "regex";
|
||||
regex = ".*";
|
||||
}
|
||||
];
|
||||
keep_receiver = [
|
||||
{
|
||||
type = "grid";
|
||||
regex = "^zrepl-.*";
|
||||
grid = lib.concatStringsSep " | " ["1x1h(keep=all)" "365x1d" "52x1w"];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "sink-to-local-drive";
|
||||
type = "sink";
|
||||
recv = { placeholder = { encryption = "off"; }; };
|
||||
recv = {placeholder = {encryption = "off";};};
|
||||
root_fs = "zbackup";
|
||||
serve = {
|
||||
type = "local";
|
||||
|
|
@ -79,4 +92,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue