infra/nixos/hosts/eidola/zfs.nix

35 lines
589 B
Nix

{pkgs, ...}: {
boot = {
supportedFilesystems = ["zfs"];
zfs = {
forceImportRoot = false;
extraPools = ["gaia"];
};
};
services.zfs = {
autoScrub = {
enable = true;
};
autoSnapshot = {
enable = true;
flags = "-v -p";
frequent = 6;
daily = 3;
weekly = 2;
monthly = 2;
};
};
sops.secrets."terra-key" = {
neededForUsers = true;
path = "/etc/secrets/terra.key";
};
fileSystems."/terra" = {
device = "gaia/terra";
fsType = "zfs";
};
environment.systemPackages = [pkgs.zfs];
}