From 92db2624c916133add4f32defb0e31d64539d245 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 5 Dec 2017 23:26:57 +0100 Subject: Move webdav out of home --- custom/ymir-nginx.nix | 4 ++-- users/gkleen.nix | 2 +- ymir.nix | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 96633f00..701a1108 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -194,11 +194,11 @@ in { include ${acme}; location ~ ^/(.+?)(/.*)?$ { - alias /home/$1/webdav$2; + alias /srv/www/webdav/$1$2; autoindex on; auth_basic "WebDAV user directory of $1"; - auth_basic_user_file /home/$1/webdav.htpasswd; + auth_basic_user_file /srv/www/webdav/$1.htpasswd; client_body_temp_path /tmp/webdav.$1; dav_methods PUT DELETE MKCOL COPY MOVE; diff --git a/users/gkleen.nix b/users/gkleen.nix index 1beaf1c3..a71a2905 100644 --- a/users/gkleen.nix +++ b/users/gkleen.nix @@ -1,7 +1,7 @@ { name = "gkleen"; description = "Gregor Kleen"; - extraGroups = [ "wheel" "network" "lp" "dialout" "audio" "xmpp" "mail" "ftp" "ssh" "vboxusers" ]; + extraGroups = [ "wheel" "network" "lp" "dialout" "audio" "xmpp" "mail" "webdav" "ssh" "vboxusers" ]; group = "users"; uid = 1000; createHome = true; diff --git a/ymir.nix b/ymir.nix index e940f8b6..882f4871 100644 --- a/ymir.nix +++ b/ymir.nix @@ -960,4 +960,6 @@ in rec { systemd.status-mail = { onFailure = [ "nixos-upgrade" "postfix" "dovecot2" "prosody" "opendkim" "nsd" "unbound" "tinc.yggdrasil" "postsrsd" ]; }; + + users.extraGroups."webdav" = {}; } -- cgit v1.2.3