This commit is contained in:
Peder Bergebakken Sundt 2024-10-14 11:37:47 +02:00
parent ea19531b5d
commit 8457b4f88b
2 changed files with 12 additions and 6 deletions

View File

@ -15,12 +15,16 @@
# head -c 8 /etc/machine-id
#networking.hostId = "12345678";
# Only datasets with the com.sun:auto-snapshot property set to true will be snapshotted.
# zfs set com.sun:auto-snapshot=true DATASET
services.zfs.autoSnapshot.enable = true; # simply runs zfstools
# default args, can be overriden per-dataset
services.zfs.autoSnapshot.frequent = 2; # 15 min
services.zfs.autoSnapshot.hourly = 3;
services.zfs.autoSnapshot.daily = 4;
services.zfs.autoSnapshot.weekly = 3;
# zfs set com.sun:auto-snapshot:weekly=false DATASET
services.zfs.autoSnapshot.frequent = 4; # 15 min
services.zfs.autoSnapshot.hourly = 24;
services.zfs.autoSnapshot.daily = 7;
services.zfs.autoSnapshot.weekly = 4;
services.zfs.autoSnapshot.monthly = 5;
#services.zfs.autoReplication.enable
@ -29,9 +33,10 @@
# the `sharenfs` property generates /etc/exports.d/zfs.exports file, automatically processed by NFS
# https://man.archlinux.org/man/core/nfs-utils/exports.5.en
# # zfs set sharenfs="-maproot=0:0 -network=192.168.1.0/24" Reidun
# # zfs set sharenfs="-maproot=0:0 -network=192.168.1.0/24" Reidun/shared
# # zfs set sharenfs="ro=192.168.1.0/24,all_squash,anonuid=70,anongid=70" Meconium
# # zfs set sharenfs="rw=@192.168.1.0/24" Meconium
# # zfs set sharenfs="rw=@100.64.0.0/10" Meconium
services.nfs.server.enable = lib.mkDefault true;
# https://wiki.nixos.org/wiki/NFS

View File

@ -10,8 +10,9 @@
# todo: tailscale nfs mount
# todo: zrepl
# TODO: zrepl pull
# https://search.nixos.org/options?channel=unstable&query=services.zrepl
# https://github.com/NixOS/infra/blob/8be4953d68ce81455787cd60e82086022855a3c2/build/haumea/zrepl.nix#L20
# TODO: rsync pull + snapshot?
}