added fsid to all nfs mounts
This commit is contained in:
parent
da78b208cd
commit
fc8877ff10
|
@ -37,20 +37,15 @@
|
||||||
lib.mkIf (config.host.network_storage.nfs.enable && config.host.network_storage.enable) {
|
lib.mkIf (config.host.network_storage.nfs.enable && config.host.network_storage.enable) {
|
||||||
services.nfs.server = {
|
services.nfs.server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
exports = lib.strings.concatLines (
|
exports = lib.strings.concatLines (lib.lists.imap0 (
|
||||||
[
|
i: directory: "${directory._directory} 100.64.0.0/10(fsid=${toString i},rw,nohide,sync,no_subtree_check,crossmnt)"
|
||||||
"/exports 100.64.0.0/10(rw,fsid=0,no_subtree_check)"
|
|
||||||
]
|
|
||||||
++ (builtins.map (
|
|
||||||
directory: "${directory._directory} 100.64.0.0/10(rw,nohide,sync,no_subtree_check,crossmnt)"
|
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
builtins.filter (
|
builtins.filter (
|
||||||
directory: lib.lists.any (target: target == directory.folder) config.host.network_storage.nfs.directories
|
directory: lib.lists.any (target: target == directory.folder) config.host.network_storage.nfs.directories
|
||||||
)
|
)
|
||||||
config.host.network_storage.directories
|
config.host.network_storage.directories
|
||||||
))
|
));
|
||||||
);
|
|
||||||
};
|
};
|
||||||
networking.firewall.interfaces.${config.services.tailscale.interfaceName}.allowedTCPPorts = [
|
networking.firewall.interfaces.${config.services.tailscale.interfaceName}.allowedTCPPorts = [
|
||||||
config.host.network_storage.nfs.port
|
config.host.network_storage.nfs.port
|
||||||
|
|
Loading…
Reference in a new issue