{ service_configs, config, pkgs, ... }: let zfs-key = "/etc/zfs-key"; in { system.activationScripts = { "zfs-key".text = '' #!/bin/sh rm -fr ${zfs-key} || true cp ${./secrets/zfs-key} ${zfs-key} ''; }; boot.zfs.package = pkgs.zfs_unstable; boot.initrd.kernelModules = [ "zfs" ]; boot.kernelParams = [ # 2048MB "zfs.zfs_arc_max=2048000000" ]; boot.supportedFilesystems = [ "zfs" ]; boot.zfs.extraPools = [ service_configs.zpool ]; }