1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/systems/zaatar/moodle-dl-meinhark.nix

131 lines
3.5 KiB
Nix
Raw Normal View History

{
2022-03-10 21:52:12 +01:00
config,
pkgs,
lib,
...
}: let
moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old:
old
// {
patches = [../../packages/moodle-dl/telegram-format.patch];
2022-03-10 21:52:12 +01:00
});
in {
imports = [../../modules/moodle-dl.nix];
age.secrets = {
moodle-dl-tokens.file = ../../secrets/zaatar-moodle-dl-tokens.json.age;
moodle-dl-basicAuth.file = ../../secrets/zaatar-moodle-dl-basicAuth.age;
};
services.moodle-dl = {
enable = true;
startAt = "hourly";
package = moodle-dl-package;
tokensFile = config.age.secrets.moodle-dl-tokens.path;
2021-04-03 15:01:45 +02:00
settings = {
telegram = {
chat_id = "18980945";
2021-04-28 06:16:49 +02:00
send_error_msg = false;
};
moodle_domain = "moodle.hu-berlin.de";
moodle_path = "/";
download_course_ids = [
# WS 2020
99881 # Dialektologie
100183 # Onomastik
100353 # Sanskrit I
100692 # Sanskrit Tutorium
99832 # Germanisch
99823 # Gotisch
99813 # Altalbanisch
98681 # Geistliche Lyrik von Luther bis Lehnert
99667 # Antike Mythologie
# 52365 # FSR KlassPhil
# SS 2021
104850 # Metrik
103274 # Marc Aurel
102909 # Sanskrit II
2021-04-10 12:25:08 +02:00
104937 # Altirisch
104925 # Gradierung und Komparation
2021-04-10 17:24:32 +02:00
105264 # Was andere Sprachen anders machen
104991 # Warum klingt Orkisch böse
105074 # Litauisch
2021-04-12 11:10:31 +02:00
103685 # Griechische Sprache und Übersetzung I
2021-04-12 18:17:45 +02:00
105455 # Elegia greca
2021-04-13 15:09:05 +02:00
105335 # Homerische Epen
# WS 2021
108122 # Griechisch
107986 # Altostslavisch
107792 # Elegie in Rom
107369 # Tusculanae Disputationes
108586 # Griechische Religion
107988 # Balkanindogermanisch
2021-10-18 07:24:32 +02:00
108312 # Altnordisch
2021-10-19 14:35:12 +02:00
107281 # NLP
108736 # Grammatiktheorie
2021-10-19 14:51:43 +02:00
109438 # Warum klingt Orkisch böse
2021-10-19 19:41:04 +02:00
108025 # Poetik der Nordgermanen
2021-10-20 08:57:23 +02:00
107280 # Statistik
2021-10-20 11:40:26 +02:00
108350 # Attische Redner
2021-10-20 16:57:21 +02:00
107461 # Argonautika
2021-10-24 08:25:35 +02:00
108283 # Digital Classicist
2021-10-28 15:16:16 +02:00
109211 # Altlitauisch
109185 # Etymologie
2022-04-19 23:29:41 +02:00
# SS 2022
112606 # Avestisch
111761 # Griechische Wissenschaftsliteratur
111515 # H. Furens
110914 # Apostelgeschichte
112225 # Gr. Paläographie
2022-04-22 12:31:37 +02:00
113275 # ALEW
112783 # Akzent und Silbenstruktur
2022-04-26 20:07:21 +02:00
113493 # Papyrologie
2022-10-03 19:14:11 +02:00
# WS 2022
115414 # Nonnos
2022-10-25 07:39:19 +02:00
116108 # Dialektologie
];
download_submissions = true;
download_descriptions = true;
download_links_in_descriptions = false;
download_databases = false;
download_forums = false;
download_linked_files = false;
download_also_with_cookie = false;
};
};
2021-09-18 15:53:21 +02:00
fileSystems."/export/moodle" = {
device = config.services.moodle-dl.directory;
2022-03-10 21:52:12 +01:00
options = ["bind"];
2021-09-18 15:53:21 +02:00
};
2022-03-10 21:52:12 +01:00
networking.firewall.allowedTCPPorts = [2049];
2021-09-18 15:53:21 +02:00
2022-01-09 10:56:06 +01:00
services.nginx.enable = true;
services.nginx.virtualHosts."moodle.kmein.r" = {
basicAuthFile = config.age.secrets.moodle-dl-basicAuth.path;
2021-12-08 11:39:19 +01:00
locations."/" = {
root = config.services.moodle-dl.directory;
extraConfig = ''
autoindex on;
charset UTF-8;
'';
};
};
2021-09-18 15:53:21 +02:00
services.nfs.server = {
enable = true;
2022-03-10 21:52:12 +01:00
exports = let
machines = with (import ../../lib).retiolumAddresses; [kabsa manakish];
2022-03-10 21:52:12 +01:00
in ''
/export ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(fsid=0)") machines}
/export/moodle ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(insecure,rw)") machines}
2021-09-18 15:53:21 +02:00
'';
};
}