Add webdav module
This commit is contained in:
parent
f0a5b45254
commit
e6ccd21a71
3 changed files with 199 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
|||
../../../modules/traefik.nix
|
||||
../../../modules/samba.nix
|
||||
../../../modules/borg.nix
|
||||
../../../modules/webdav.nix
|
||||
];
|
||||
|
||||
# GRUB bootloader with ZFS support
|
||||
|
|
@ -225,6 +226,23 @@
|
|||
# Samba file sharing configuration
|
||||
services.samba-custom = { enable = false; };
|
||||
|
||||
# WebDAV file server configuration
|
||||
services.webdav-server = {
|
||||
enable = true;
|
||||
port = 5009;
|
||||
servePath = "/mnt/storage/Media/NSFW";
|
||||
auth = {
|
||||
username = "yanlin";
|
||||
passwordFile = "/etc/webdav-password";
|
||||
};
|
||||
readOnly = false;
|
||||
allowUpload = true;
|
||||
allowDelete = true;
|
||||
allowSearch = true;
|
||||
allowSymlink = false;
|
||||
hideDotFiles = true;
|
||||
};
|
||||
|
||||
# Borg backup configuration
|
||||
services.borgbackup-custom = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -149,6 +149,19 @@
|
|||
}];
|
||||
};
|
||||
};
|
||||
|
||||
# WebDAV file server
|
||||
files = {
|
||||
rule = "Host(`files.yanlincs.com`)";
|
||||
entrypoints = "websecure";
|
||||
service = "files";
|
||||
tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = [{
|
||||
main = "*.yanlincs.com";
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
# Redirect service
|
||||
|
|
@ -249,6 +262,15 @@
|
|||
}];
|
||||
};
|
||||
};
|
||||
|
||||
# WebDAV file server backend (via WireGuard)
|
||||
files = {
|
||||
loadBalancer = {
|
||||
servers = [{
|
||||
url = "http://10.2.2.20:5009";
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
middlewares = {
|
||||
# Redirect middleware
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue