move filesystem imports to module level
This commit is contained in:
46
zfs-management.nix
Normal file
46
zfs-management.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ 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";
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user