Files
nixconf/zfs-management.nix

46 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
# Add ZFS and NFS support to the initramfs so it can be mounted at boot.
boot.supportedFilesystems = [ "zfs" "nfs" ];
# boot.zfs.enableUnstable = true;
boot.zfs.forceImportRoot = false;
# boot.zfs.extraPools = [ "DATA" ];
services.zfs.autoScrub.enable = true;
# Enable and configure zrepl service
environment.systemPackages = [ pkgs.zrepl ];
services.zrepl = {
enable = true;
settings = {
global = {
logging = [{
# use syslog instead of stdout because it makes journald happy
type = "syslog";
format = "human";
level = "info";
}];
};
jobs = [{
type = "source";
name = "pullsource";
send = {
encrypted = true;
};
serve = {
type = "stdinserver";
client_identities = [ "siredward" ];
};
filesystems = {
"SERVICE/volumes" = true;
};
snapshotting = {
type = "periodic";
prefix = "SN_";
interval = "1h";
};
}];
};
};
}