fixed nfs

This commit is contained in:
Geir Okkenhaug Jerstad 2025-06-07 16:33:34 +00:00
parent 9bfddf14ce
commit 4a57978f45
6 changed files with 21 additions and 20 deletions

View file

@ -9,19 +9,20 @@
# Export the storage directory (ZFS dataset)
# Allow access from both local network and Tailscale network
exports = ''
/mnt/storage 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash) 100.64.0.0/10(rw,sync,no_subtree_check,no_root_squash)
/mnt/storage 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash) 100.64.0.0/10(rw,sync,no_subtree_check,no_root_squash)
/mnt/storage/media 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash) 100.64.0.0/10(rw,sync,no_subtree_check,no_root_squash)
'';
# Create exports on startup
createMountPoints = true;
};
# Ensure the storage subdirectories exist (ZFS dataset is mounted at /mnt/storage)
systemd.tmpfiles.rules = [
"d /mnt/storage/media 0755 sma users -"
"d /mnt/storage/downloads 0755 sma users -"
"d /mnt/storage/backups 0755 sma users -"
"d /mnt/storage/shares 0755 sma users -"
];
# systemd.tmpfiles.rules = [
# "d /mnt/storage/media 0755 sma users -"
# "d /mnt/storage/downloads 0755 sma users -"
# "d /mnt/storage/backups 0755 sma users -"
# "d /mnt/storage/shares 0755 sma users -"
# ];
# Required packages for NFS
environment.systemPackages = with pkgs; [