config/profiles/mounts/meconium-nfs.nix

27 lines
709 B
Nix
Raw Normal View History

2023-12-10 06:03:49 +01:00
{ config, pkgs, lib, ... }:
{
# TODO: wireguard
#boot.kernelParams = [ "nfs.nfs4_disable_idmapping=0" "nfsd.nfs4_disable_idmapping=0" ];
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;
2024-08-13 16:26:58 +02:00
# TODO: space in dirname is not supported
in joinSets (map (mkMount "/mnt/meconium" "192.168.1.8:/Meconium" ) [
2023-12-10 06:03:49 +01:00
""
2023-12-10 09:47:02 +01:00
"/backups"
"/backups/rocm"
2023-12-10 06:03:49 +01:00
"/beets_music"
2024-04-16 06:49:45 +02:00
#"/garage"
#"/garage/gunktrunk"
2024-08-13 16:26:58 +02:00
]);
2023-12-10 06:03:49 +01:00
}