base/snapshot: move sanoid there
This commit is contained in:
@@ -67,10 +67,16 @@ in {
|
||||
stateVersion = "22.11";
|
||||
timeZone = "UTC";
|
||||
|
||||
base.initrd = {
|
||||
enable = true;
|
||||
authorizedKeys = builtins.attrValues myData.ssh_pubkeys;
|
||||
hostKeys = ["/etc/secrets/initrd/ssh_host_ed25519_key"];
|
||||
base = {
|
||||
initrd = {
|
||||
enable = true;
|
||||
authorizedKeys = builtins.attrValues myData.ssh_pubkeys;
|
||||
hostKeys = ["/etc/secrets/initrd/ssh_host_ed25519_key"];
|
||||
};
|
||||
snapshot = {
|
||||
enable = true;
|
||||
mountpoints = ["/var/lib" "/var/log"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -141,23 +147,6 @@ in {
|
||||
localuser = null;
|
||||
};
|
||||
|
||||
sanoid = {
|
||||
enable = true;
|
||||
templates.prod = {
|
||||
hourly = 24;
|
||||
daily = 7;
|
||||
autosnap = true;
|
||||
autoprune = true;
|
||||
};
|
||||
datasets =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = value.zfs_name;
|
||||
value = {use_template = ["prod"];};
|
||||
})
|
||||
backup_paths;
|
||||
extraArgs = ["--verbose"];
|
||||
};
|
||||
|
||||
borgbackup.jobs =
|
||||
lib.mapAttrs' (name: value: let
|
||||
snapshot = {
|
||||
|
||||
@@ -10,16 +10,6 @@ in {
|
||||
stateVersion = "23.05";
|
||||
timeZone = "UTC";
|
||||
stubPasswords = true;
|
||||
|
||||
base.snapshot = {
|
||||
enable = true;
|
||||
pools = {
|
||||
var_lib = {
|
||||
mountpoint = "/var/lib";
|
||||
zfs_name = "rpool/nixos/var/lib";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
|
||||
Reference in New Issue
Block a user