{ pkgs, lib, ... }: with lib; { services.nfs.server = { enable = true; exports = '' /home 10.32.45.0/24(rw,async,no_root_squash) ''; }; networking.firewall.allowedTCPPorts = [ 2049 # NFSv4 ]; environment.systemPackages = with pkgs; [ quota ]; disko.devices = { disk = genAttrs [ "pci-0000:00:17.0-ata-1" "pci-0000:00:17.0-ata-2" "pci-0000:00:17.0-ata-3" "pci-0000:00:17.0-ata-4" ] (path: { type = "disk"; device = "/dev/disk/by-path/${path}"; content = { type = "mdraid"; name = "home"; }; }); mdadm = { home = { type = "mdadm"; level = 5; content = { type = "gpt"; partitions = { primary = { size = "100%"; content = { type = "filesystem"; format = "ext4"; mountpoint = "/home"; extraArgs = [ "-Oquota" "-Equotatype=usrquota" ]; mountOptions = [ "defaults" "quota" ]; }; }; }; }; }; }; }; }