2023-12-10 06:03:49 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2024-10-19 04:05:19 +02:00
|
|
|
|
|
|
|
# TODO: use tailscale if enabled
|
|
|
|
|
2023-12-10 06:03:49 +01:00
|
|
|
{
|
|
|
|
# TODO: wireguard
|
|
|
|
#boot.kernelParams = [ "nfs.nfs4_disable_idmapping=0" "nfsd.nfs4_disable_idmapping=0" ];
|
|
|
|
|
2024-09-29 17:31:39 +02:00
|
|
|
# https://wiki.nixos.org/wiki/NFS
|
|
|
|
|
2023-12-10 06:03:49 +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;
|
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
|
|
|
|
|
|
|
}
|