config/profiles/mounts/freon-nfs.nix

29 lines
694 B
Nix
Raw Permalink Normal View History

2024-01-11 00:36:51 +01:00
{ config, pkgs, lib, ... }:
2024-10-19 04:05:19 +02:00
# TODO: use tailscale if enabled
2024-01-11 00:36:51 +01:00
{
# 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/freon" "192.168.1.3:/Freon") [
2024-01-11 00:36:51 +01:00
""
2024-02-10 21:32:14 +01:00
"/Backups"
"/ISO"
2024-02-17 23:15:21 +01:00
"/Games"
2024-02-17 03:49:50 +01:00
"/Images"
2024-08-13 16:26:58 +02:00
]);
2024-01-11 00:36:51 +01:00
}