config/profiles/mounts/reidun-nfs.nix

61 lines
1.4 KiB
Nix
Raw Normal View History

2023-02-24 21:36:30 +01:00
{ config, pkgs, lib, ... }:
{
2023-03-11 15:59:56 +01:00
# TODO: wireguard
#boot.kernelParams = [ "nfs.nfs4_disable_idmapping=0" "nfsd.nfs4_disable_idmapping=0" ];
2023-02-24 21:36:30 +01:00
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 (
2024-02-10 21:32:14 +01:00
# TODO: space in dirname is not supported
2023-02-24 21:36:30 +01:00
(map (mkMount "/mnt/reidun" "192.168.1.3:/Reidun/shared") [
""
2024-02-10 21:32:14 +01:00
#"/Backups"
2023-02-24 21:36:30 +01:00
"/Comics"
"/Downloads"
"/Games"
"/Games/Installable"
"/Games/Portable"
"/Games/ROMs"
2024-02-10 21:32:14 +01:00
#"/ISO"
2023-02-24 21:36:30 +01:00
"/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"
"/Work"
"/Work/Documents"
2024-02-10 21:32:14 +01:00
"/Work/FL-Studio"
2023-02-24 21:36:30 +01:00
"/Work/Programming"
"/Work/School"
"/pub"
])
);
}