{ lib, config, ... } : let mkNetworkFileSystem = device : { device = "${device}"; fsType = "nfs"; options = [ "noauto" "defaults" ]; }; in { options = { fs.networkFS.enable = lib.mkEnableOption "enable network shares"; }; config = { fileSystems = lib.mkIf config.fs.networkFS.enable { "/media/Storage/Media" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Media"; "/media/Storage/Backups" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups"; "/media/Storage/Tapes" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups/Tapes"; "/media/Family Photos" = mkNetworkFileSystem "truenas-home:/mnt/Media/Photos"; "/media/chexx/chexx" = mkNetworkFileSystem "truenas-office:/mnt/Storage/chexx"; "/media/chexx/tkdocs" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Users/Tim-Keller"; "/media/chexx/scans" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Scans"; }; }; }