add nfs and autofs system
This commit is contained in:
parent
27408723d9
commit
73b137dc84
6 changed files with 92 additions and 341 deletions
|
|
@ -7,9 +7,8 @@
|
|||
../../../modules/wireguard.nix
|
||||
../../../modules/podman.nix
|
||||
../../../modules/traefik.nix
|
||||
../../../modules/samba.nix
|
||||
../../../modules/nfs.nix
|
||||
../../../modules/borg-client.nix
|
||||
../../../modules/webdav.nix
|
||||
../../../modules/login-display.nix
|
||||
];
|
||||
|
||||
|
|
@ -197,24 +196,11 @@
|
|||
|
||||
|
||||
|
||||
# Samba file sharing configuration
|
||||
services.samba-custom = { enable = false; };
|
||||
|
||||
# WebDAV file server configuration
|
||||
services.webdav-server = {
|
||||
enable = false;
|
||||
port = 5009;
|
||||
servePath = "/mnt/storage/Media";
|
||||
auth = {
|
||||
username = "yanlin";
|
||||
passwordFile = "/etc/webdav-password";
|
||||
};
|
||||
readOnly = false;
|
||||
allowUpload = true;
|
||||
allowDelete = true;
|
||||
allowSearch = true;
|
||||
allowSymlink = false;
|
||||
hideDotFiles = true;
|
||||
# NFS file sharing configuration
|
||||
services.nfs-custom = {
|
||||
enable = true;
|
||||
exportPath = "/mnt/storage/Media";
|
||||
allowedNetwork = "10.2.2.0/24";
|
||||
};
|
||||
|
||||
# Login display with SMART disk health status
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
./hardware-configuration.nix
|
||||
../system-default.nix # Common NixOS system configuration
|
||||
../../../modules/wireguard.nix
|
||||
../../../modules/autofs.nix
|
||||
../../../modules/login-display.nix
|
||||
];
|
||||
|
||||
|
|
@ -317,4 +318,12 @@
|
|||
showDiskUsage = true;
|
||||
};
|
||||
|
||||
# AutoFS auto-mounting for remote NFS shares
|
||||
services.autofs-custom = {
|
||||
enable = true;
|
||||
remoteHost = "10.2.2.20";
|
||||
remotePath = "/mnt/storage/Media";
|
||||
mountPoint = "/mnt/hs-media";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue