From 0fea7ba9385d1f7646480683e8a55ebbb9820cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 8 Dec 2021 11:39:19 +0100 Subject: [PATCH] feat(moodle-dl): serve via retiolum --- configs/moodle-dl/meinhark.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configs/moodle-dl/meinhark.nix b/configs/moodle-dl/meinhark.nix index fb5e54e..36465fd 100644 --- a/configs/moodle-dl/meinhark.nix +++ b/configs/moodle-dl/meinhark.nix @@ -82,6 +82,21 @@ in networking.firewall.allowedTCPPorts = [ 2049 ]; + services.nginx.virtualHosts."moodle.kmein.r" = + let + identity = lib.strings.fileContents ; + password = lib.strings.fileContents ; + in { + basicAuth."${identity}" = password; + locations."/" = { + root = config.services.moodle-dl.directory; + extraConfig = '' + autoindex on; + charset UTF-8; + ''; + }; + }; + services.nfs.server = { enable = true; exports = let machines = with (import ).retiolumAddresses; [kabsa manakish]; in ''