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
|
2025-01-25 03:10:56 +01:00
|
|
|
in joinSets (map (mkMount "/mnt/meconium" "192.168.1.9:/mnt/meconium" ) [
|
|
|
|
/* in joinSets (map (mkMount "/mnt/meconium" "noximilien.tail9aac63.ts.net:/mnt/meconium" ) [ */
|
|
|
|
/* in joinSets (map (mkMount "/mnt/meconium" "100.113.27.44:/mnt/meconium" ) [ */
|
2023-12-10 06:03:49 +01:00
|
|
|
""
|
2025-01-25 03:10:56 +01:00
|
|
|
"/Backups"
|
|
|
|
"/Backups/rocm.pbsds.net"
|
|
|
|
"/blob"
|
|
|
|
"/blob/attic"
|
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
|
|
|
|
|
|
|
}
|