nix-config/modules/hardware/zfs.nix
Patrick ee0e489618
reworked file layout
reworked impermanence
2023-09-02 17:30:09 +02:00

42 lines
822 B
Nix

{
pkgs,
config,
...
}: {
boot.supportedFilesystems = ["zfs"];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
# The root pool should never be imported forcefully.
# Failure to import is important to notice!
boot.zfs.forceImportRoot = false;
environment.systemPackages = with pkgs; [zfs];
# Might help with hangs mainly atuin
#boot.kernelPatches = [
# {
# name = "enable RT_FULL";
# patch = null;
# extraConfig = ''
# PREEMPT y
# PREEMPT_BUILD y
# PREEMPT_VOLUNTARY n
# PREEMPT_COUNT y
# PREEMPTION y
# DEBUG_INFO_BTF n
# '';
# }
#];
services.zfs = {
autoScrub = {
enable = true;
interval = "weekly";
};
trim = {
enable = true;
interval = "weekly";
};
};
}