about summary refs log tree commit diff
path: root/machines/srv3/webdav.nix
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <patryk@niedzwiedzinski.cyou>2024-10-30 19:26:05 +0100
committerPatryk Niedźwiedziński <patryk@niedzwiedzinski.cyou>2024-10-30 19:26:05 +0100
commita15e92fcfa04cf23e15dc0899a6578a3e664b2ee (patch)
treeabf7105ea3bb1ec73909bfbb2d83f964f5e0a4d5 /machines/srv3/webdav.nix
parent40c3297200760e515178bdf849529a7426cb39a2 (diff)
downloaddots-a15e92fcfa04cf23e15dc0899a6578a3e664b2ee.tar.gz
dots-a15e92fcfa04cf23e15dc0899a6578a3e664b2ee.zip
Add webdav
Diffstat (limited to 'machines/srv3/webdav.nix')
-rw-r--r--machines/srv3/webdav.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/machines/srv3/webdav.nix b/machines/srv3/webdav.nix
new file mode 100644
index 0000000..9a4c126
--- /dev/null
+++ b/machines/srv3/webdav.nix
@@ -0,0 +1,33 @@
+{ pkgs, ... }:
+let
+	port = "6060";
+in
+{
+	services.nginx.virtualHosts."files.niedzwiedzinski.cyou" = {
+		forceSSL = true;
+		enableACME = true;
+
+		locations."/" = {
+			proxyPass = "http://localhost:${port}";
+		};
+	};
+
+	services.webdav = {
+		enable = true;
+		configFile = "/etc/webdav.yaml";
+		#settings = {
+			#address = "0.0.0.0";
+			#port = port;
+			#scope = "/srv/files";
+			#modify = true;
+			#auth = true;
+			#users = [
+			#{
+				#username = "patryk";
+				#password = "test";
+			#}
+			#];
+		#};
+	};
+
+}