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 ''