fixed nfs shares
This commit is contained in:
parent
682e911e3c
commit
9ef33d0d8b
|
@ -55,18 +55,18 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
directories = [
|
directories = [
|
||||||
{
|
{
|
||||||
folder = "leyla";
|
folder = "leyla_documents";
|
||||||
user = "leyla";
|
user = "leyla";
|
||||||
group = "leyla";
|
group = "leyla";
|
||||||
bind = "/home/leyla/documents";
|
bind = "/home/leyla/documents";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
folder = "eve";
|
folder = "eve_documents";
|
||||||
user = "eve";
|
user = "eve";
|
||||||
group = "eve";
|
group = "eve";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
folder = "users";
|
folder = "users_documents";
|
||||||
user = "root";
|
user = "root";
|
||||||
group = "users";
|
group = "users";
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
];
|
];
|
||||||
nfs = {
|
nfs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
directories = ["leyla" "eve"];
|
directories = ["leyla_documents" "eve_documents" "users_documents" "media"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
reverse_proxy = {
|
reverse_proxy = {
|
||||||
|
|
|
@ -39,19 +39,19 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
"/mnt/leyla_documents" = {
|
"/mnt/leyla_documents" = {
|
||||||
device = "defiant:/exports/leyla";
|
device = "defiant:/exports/leyla_documents";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["x-systemd.automount" "user" "noatime" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
|
options = ["x-systemd.automount" "user" "noatime" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/mnt/eve_documents" = {
|
"/mnt/eve_documents" = {
|
||||||
device = "defiant:/exports/eve";
|
device = "defiant:/exports/eve_documents";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
|
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/mnt/users_documents" = {
|
"/mnt/users_documents" = {
|
||||||
device = "defiant:/exports/users";
|
device = "defiant:/exports/users_documents";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
|
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,15 +38,18 @@
|
||||||
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(rw,sync,no_subtree_check,crossmnt,fsid=${builtins.toString i})"
|
"/export 100.64.0.0/10(rw,fsid=0,no_subtree_check)"
|
||||||
)
|
]
|
||||||
(
|
++ (builtins.map (
|
||||||
builtins.filter (
|
directory: "${directory._directory} 100.64.0.0/10(rw,nohide,sync,no_subtree_check,crossmnt)"
|
||||||
directory: lib.lists.any (target: target == directory.folder) config.host.network_storage.nfs.directories
|
|
||||||
)
|
)
|
||||||
config.host.network_storage.directories
|
(
|
||||||
)
|
builtins.filter (
|
||||||
|
directory: lib.lists.any (target: target == directory.folder) config.host.network_storage.nfs.directories
|
||||||
|
)
|
||||||
|
config.host.network_storage.directories
|
||||||
|
))
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
networking.firewall.interfaces.${config.services.tailscale.interfaceName}.allowedTCPPorts = [
|
networking.firewall.interfaces.${config.services.tailscale.interfaceName}.allowedTCPPorts = [
|
||||||
|
|
Loading…
Reference in a new issue