From 64425bd44704a161a704add9e943cfe121b908ab Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Tue, 31 Dec 2024 14:36:15 +0100 Subject: [PATCH 1/3] Fix permissions before starting `nfs-server` --- modules/sisko-share/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/sisko-share/default.nix b/modules/sisko-share/default.nix index 41ea29b..6d4a3cb 100644 --- a/modules/sisko-share/default.nix +++ b/modules/sisko-share/default.nix @@ -16,6 +16,9 @@ ''; }; + systemd.services.nfs-server.preStart = '' + chmod -R 775 /export/hd/torrent + ''; services.webdav = { enable = true; From 37e55bb3426791f1c8266f6e6df91c26f82cbd9c Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Tue, 31 Dec 2024 14:36:38 +0100 Subject: [PATCH 2/3] Expose webdav both on the LAN and the VPN --- modules/sisko-share/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/sisko-share/default.nix b/modules/sisko-share/default.nix index 6d4a3cb..22f52a6 100644 --- a/modules/sisko-share/default.nix +++ b/modules/sisko-share/default.nix @@ -19,15 +19,16 @@ systemd.services.nfs-server.preStart = '' chmod -R 775 /export/hd/torrent ''; + services.webdav = { enable = true; settings = { - address = "10.1.1.2"; # accessible only in LAN, used by Kodi installed on the TV + address = "0.0.0.0"; port = 9999; scope = "/mnt/hd/torrent"; modify = false; - auth = false; # TODO should we enable authentication? It's only reachable in LAN + auth = false; debug = true; users = [ ]; }; From a3d1233ad19e47a4a4f23fc6516b21d570bd8b54 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Tue, 31 Dec 2024 14:36:58 +0100 Subject: [PATCH 3/3] Torrents readable by everybody by default --- modules/transmission/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/transmission/default.nix b/modules/transmission/default.nix index 15db1d1..b049158 100644 --- a/modules/transmission/default.nix +++ b/modules/transmission/default.nix @@ -39,8 +39,8 @@ ]; systemd.tmpfiles.rules = [ - "d /mnt/hd/torrent 770 transmission transmission" - "d /mnt/hd/torrent/.incomplete 770 transmission transmission" + "d /mnt/hd/torrent 774 transmission transmission" + "d /mnt/hd/torrent/.incomplete 774 transmission transmission" ]; environment.persistence."/persist".directories = [