{ username, lib, pkgs, ... }: { boot = { supportedFilesystems = [ "zfs" ]; zfs.extraPools = [ "yottapool" ]; }; services.zfs = { autoScrub.enable = true; zed.settings = { ZED_DEBUG_LOG = "/tmp/zed.debug.log"; ZED_EMAIL_ADDR = [ username ]; ZED_EMAIL_PROG = lib.getExe pkgs.msmtp; ZED_EMAIL_OPTS = "@ADDRESS@"; ZED_NOTIFY_INTERVAL_SECS = 3600; ZED_NOTIFY_VERBOSE = true; ZED_USE_ENCLOSURE_LEDS = true; ZED_SCRUB_AFTER_RESILVER = true; }; }; services.samba-wsdd = { enable = true; openFirewall = true; }; # TODO: Clean up. Potentially make it a separate module services.avahi = { publish.enable = true; publish.userServices = true; nssmdns4 = true; enable = true; openFirewall = true; extraServiceFiles = { timemachine = '' %h _smb._tcp 445 _device-info._tcp 0 model=TimeCapsule8,119 _adisk._tcp dk0=adVN=tm_share,adVF=0x82 sys=waMa=0,adVF=0x100 ''; }; }; services.samba = { enable = true; openFirewall = true; settings = { global = { "workgroup" = "WORKGROUP"; "hosts allow" = "0.0.0.0/0"; "guest account" = "nobody"; "map to guest" = "bad user"; "getwd cache" = "true"; "strict sync" = "no"; "use sendfile" = "true"; }; "tm_share" = { "path" = "/media/data/tm_share"; "valid users" = "niko"; "public" = "no"; "writeable" = "yes"; "force user" = "niko"; "fruit:aapl" = "yes"; "fruit:time machine" = "yes"; "vfs objects" = "catia fruit streams_xattr"; }; }; }; }