small update moved some files to logical place
This commit is contained in:
parent
e69fd5856f
commit
fff47629f2
5 changed files with 20 additions and 3 deletions
31
machines/sleeper-service/nfs.nix
Normal file
31
machines/sleeper-service/nfs.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
# NFS Server Configuration
|
||||
# Network File System server for home lab storage
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# NFS server configuration
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
# Export the storage directory (ZFS dataset)
|
||||
exports = ''
|
||||
/mnt/storage 10.0.0.0/24(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 -"
|
||||
];
|
||||
|
||||
# Required packages for NFS
|
||||
environment.systemPackages = with pkgs; [
|
||||
nfs-utils
|
||||
];
|
||||
|
||||
# Firewall rules are already configured in network module
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue