{ config, pkgs, lib, ... }: { fileSystems = let mkMount = mountpoint: server: subdir: { "${mountpoint}${subdir}" = { device = "${server}${subdir}"; fsType = "nfs"; #options = [ "nfsvers=4.2" ]; }; }; # TODO: combine nameValuePair and listToAttrs joinSets = sets: builtins.foldl' (l: r: l // r) {} sets; in joinSets ( (map (mkMount "/mnt/reidun" "192.168.1.3:/Reidun/shared") [ "" "/Backups" "/Comics" "/Downloads" "/Games" "/Games/Installable" "/Games/Portable" "/Games/ROMs" "/ISO" "/Images" "/Images/Collections" "/Images/Memes" "/Images/Pictures" "/Images/Wallpapers" "/Music" "/Music/Albums" "/Music/Kancolle" "/Music/OST" "/Music/Old" "/Music/Touhou" "/Music/Vocaloid" "/Music/dojin.co" "/Various" "/Various/Zotero" "/Various/resilio" "/Video" "/Video/Anime" "/Video/Concerts" "/Video/Documentaries" "/Video/Movies" "/Video/Musicvideos" "/Video/Series" "/Video/Talks" "/Work" "/Work/Documents" #"/Work/FL Studio" # broken, maybe due to the space? "/Work/Programming" "/Work/School" "/pub" ]) ++ (map (mkMount "/mnt/meconium" "192.168.1.3:/Meconium" ) [ "" "/beets_music" ]) ); }