summaryrefslogtreecommitdiff
path: root/hosts/surtr/http/webdav/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/surtr/http/webdav/default.nix')
-rw-r--r--hosts/surtr/http/webdav/default.nix54
1 files changed, 27 insertions, 27 deletions
diff --git a/hosts/surtr/http/webdav/default.nix b/hosts/surtr/http/webdav/default.nix
index 5f2955bc..1da411d3 100644
--- a/hosts/surtr/http/webdav/default.nix
+++ b/hosts/surtr/http/webdav/default.nix
@@ -26,14 +26,14 @@ in {
26 account sufficient pam_unix.so quiet 26 account sufficient pam_unix.so quiet
27 ''; 27 '';
28 users.groups."webdav" = {}; 28 users.groups."webdav" = {};
29 29
30 services.nginx = { 30 services.nginx = {
31 upstreams."py-webdav" = { 31 # upstreams."py-webdav" = {
32 servers = { 32 # servers = {
33 "unix://${webdavSocket}" = {}; 33 # "unix://${webdavSocket}" = {};
34 }; 34 # };
35 }; 35 # };
36 36
37 virtualHosts."webdav.141.li" = { 37 virtualHosts."webdav.141.li" = {
38 forceSSL = true; 38 forceSSL = true;
39 sslCertificate = "/run/credentials/nginx.service/webdav.141.li.pem"; 39 sslCertificate = "/run/credentials/nginx.service/webdav.141.li.pem";
@@ -41,19 +41,19 @@ in {
41 sslTrustedCertificate = "/run/credentials/nginx.service/webdav.141.li.chain.pem"; 41 sslTrustedCertificate = "/run/credentials/nginx.service/webdav.141.li.chain.pem";
42 locations = { 42 locations = {
43 "/".extraConfig = '' 43 "/".extraConfig = ''
44 root /srv/files/$remote_user; 44 root /srv/files/$remote_user;
45 45
46 auth_pam "WebDAV"; 46 auth_pam "WebDAV";
47 auth_pam_service_name "webdav"; 47 auth_pam_service_name "webdav";
48 ''; 48 '';
49 49
50 "/py/".extraConfig = '' 50 # "/py/".extraConfig = ''
51 rewrite ^/py(.*) $1 break; 51 # rewrite ^/py(.*) $1 break;
52 52
53 include ${config.services.nginx.package}/conf/uwsgi_params; 53 # include ${config.services.nginx.package}/conf/uwsgi_params;
54 uwsgi_param SCRIPT_NAME /py; 54 # uwsgi_param SCRIPT_NAME /py;
55 uwsgi_pass py-webdav; 55 # uwsgi_pass py-webdav;
56 ''; 56 # '';
57 }; 57 };
58 extraConfig = '' 58 extraConfig = ''
59 dav_methods PUT DELETE MKCOL COPY MOVE; 59 dav_methods PUT DELETE MKCOL COPY MOVE;
@@ -83,18 +83,18 @@ in {
83 ]; 83 ];
84 84
85 85
86 services.uwsgi.instance.vassals.webdav = { 86 # services.uwsgi.instance.vassals.webdav = {
87 type = "normal"; 87 # type = "normal";
88 socket = webdavSocket; 88 # socket = webdavSocket;
89 listen = 1024; 89 # listen = 1024;
90 master = true; 90 # master = true;
91 vacuum = true; 91 # vacuum = true;
92 chown-socket = "${config.services.nginx.user}:${config.services.uwsgi.group}"; 92 # chown-socket = "${config.services.nginx.user}:${config.services.uwsgi.group}";
93 93
94 plugins = ["python3"]; 94 # plugins = ["python3"];
95 pythonPackages = self: [webdavApp]; 95 # pythonPackages = self: [webdavApp];
96 module = "webdav"; 96 # module = "webdav";
97 callable = "app"; 97 # callable = "app";
98 }; 98 # };
99 }; 99 };
100} 100}