Use attrsets

This commit is contained in:
Sandro - 2022-06-13 20:32:50 +02:00
parent 6fb6b3ad3f
commit 7aac81a70f
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 144 additions and 130 deletions

View File

@ -10,17 +10,19 @@ let
}; };
luftqualitaetStations = [ "1672" "1649" "1680" "1639" ]; luftqualitaetStations = [ "1672" "1649" "1680" "1639" ];
in { in {
c3d2.isInHq = false; c3d2 = {
c3d2.autoUpdate = true; isInHq = false;
autoUpdate = true;
};
networking.hostName = "scrape"; networking = {
networking.interfaces.eth0.ipv4.addresses = [{ hostName = "scrape";
address = "172.20.73.32"; interfaces.eth0.ipv4.addresses = [{
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len; address = "172.20.73.32";
}]; prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
networking.defaultGateway = "172.20.73.1"; }];
# Required for deployment defaultGateway = "172.20.73.1";
services.openssh.enable = true; };
users.groups.scrape = {}; users.groups.scrape = {};
users.users.scrape = { users.users.scrape = {

View File

@ -2,132 +2,144 @@
with lib; with lib;
{ boot.isContainer = true; {
boot.loader.initScript.enable = true;
networking.interfaces.eth0.ipv4.addresses = [{ address = "172.20.73.52"; prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len; }];
networking.interfaces.eth0.useDHCP = false;
networking.defaultGateway = "172.20.73.1";
networking.nameservers = [ "172.20.73.8" "9.9.9.9" ];
networking.hostName = mkDefault "ticker";
networking.useDHCP = false;
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
nix.useSandbox = false;
time.timeZone = "Europe/Berlin";
services.openssh.enable = true;
c3d2.hq.statistics.enable = true; c3d2.hq.statistics.enable = true;
services.nginx.enable = true; boot = {
services.nginx.virtualHosts."ticker.c3d2.de" = { isContainer = true;
forceSSL = true; loader.initScript.enable = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8400";
}; };
services.ticker.updateInterval = "hourly"; networking = {
services.ticker.config.calendars = { interfaces.eth0 = {
c3d2 = { ipv4.addresses = [{ address = "172.20.73.52"; prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len; }];
url = "https://c3d2.de/ical.ics"; useDHCP = false;
color = "#BFA73F";
}; };
dresden-science = { defaultGateway = "172.20.73.1";
url = "https://www.dresden-science-calendar.de/calendar/de/iCalSync.ics"; nameservers = [ "172.20.73.8" "9.9.9.9" ];
color = "#00007F"; hostName = "ticker";
useDHCP = false;
firewall.allowedTCPPorts = [ 22 80 443 ];
};
services = {
nginx = {
enable = true;
virtualHosts."ticker.c3d2.de" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8400";
};
}; };
gruenes-brett = {
url = "https://dresden.gruenesbrett.net/ical/all/"; ticker = {
color = "#00BF00"; updateInterval = "hourly";
}; config.calendars = {
stura-htw = { c3d2 = {
url = "http://www.stura.htw-dresden.de/events/aggregator/ics_view"; url = "https://c3d2.de/ical.ics";
color = "#BF3FA7"; color = "#BFA73F";
}; };
malobeo = { dresden-science = {
url = "https://malobeo.org/events/list/?ical=1&tribe_display=all"; url = "https://www.dresden-science-calendar.de/calendar/de/iCalSync.ics";
color = "#FF3F3F"; color = "#00007F";
}; };
hicknhack = { gruenes-brett = {
url = "https://www.google.com/calendar/ical/grhnk1uaotql6gv2dkf9ldmqjc%40group.calendar.google.com/public/basic.ics"; url = "https://dresden.gruenesbrett.net/ical/all/";
color = "#A700A7"; color = "#00BF00";
}; };
palaissommer = { stura-htw = {
url = "https://palaissommer.de/programm/?event=all"; url = "http://www.stura.htw-dresden.de/events/aggregator/ics_view";
color = "#7F003F"; color = "#BF3FA7";
}; };
kreta = { malobeo = {
url = "https://www.kreta-dresden.org/kreta.ics"; url = "https://malobeo.org/events/list/?ical=1&tribe_display=all";
color = "#BF3F7F"; color = "#FF3F3F";
}; };
zentralwerk = { hicknhack = {
url = "https://ics.teamup.com/feed/ksayh65fgotv2prcas/0.ics"; url = "https://www.google.com/calendar/ical/grhnk1uaotql6gv2dkf9ldmqjc%40group.calendar.google.com/public/basic.ics";
color = "#FF3F3F"; color = "#A700A7";
}; };
and = { palaissommer = {
url = "https://and.notraces.net/events/?ical=1"; url = "https://palaissommer.de/programm/?event=all";
color = "#FF7F00"; color = "#7F003F";
}; };
rosenwerk-home = { kreta = {
url = "https://www.google.com/calendar/ical/bj85d742g31mgkblbaiusmk3s8%40group.calendar.google.com/public/basic.ics"; url = "https://www.kreta-dresden.org/kreta.ics";
color = "#DF003F"; color = "#BF3F7F";
}; };
rosenwerk-kultur = { zentralwerk = {
url = "https://www.google.com/calendar/ical/93enn926ddhgr79hnqp83ipj3g%40group.calendar.google.com/public/basic.ics"; url = "https://ics.teamup.com/feed/ksayh65fgotv2prcas/0.ics";
color = "#BF001F"; color = "#FF3F3F";
}; };
haengemathe = { and = {
url = "https://club-haengemathe.de/termine.ics"; url = "https://and.notraces.net/events/?ical=1";
color = "#FF7F3F"; color = "#FF7F00";
}; };
bitsundbaeumedresden = { rosenwerk-home = {
url = "https://dresden.bits-und-baeume.org/termine.ics"; url = "https://www.google.com/calendar/ical/bj85d742g31mgkblbaiusmk3s8%40group.calendar.google.com/public/basic.ics";
color = "#3FBF3F"; color = "#DF003F";
}; };
exma-stuta = { rosenwerk-kultur = {
url = "https://www.exmatrikulationsamt.de/ics/v1/stuta.ics"; url = "https://www.google.com/calendar/ical/93enn926ddhgr79hnqp83ipj3g%40group.calendar.google.com/public/basic.ics";
color = "#7F7FFF"; color = "#BF001F";
}; };
exma-nawa = { haengemathe = {
url = "https://www.exmatrikulationsamt.de/ics/v1/nawa.ics"; url = "https://club-haengemathe.de/termine.ics";
color = "#3F3FBF"; color = "#FF7F3F";
}; };
ratsinfo = { bitsundbaeumedresden = {
url = "https://github.com/offenesdresden/dresden-ratsinfo/raw/master/meetings.ics"; url = "https://dresden.bits-und-baeume.org/termine.ics";
color = "#BFBF3F"; color = "#3FBF3F";
}; };
filmnaechte = { exma-stuta = {
url = "https://dresden.filmnaechte.de/veranstaltung?tx_events_frontend%5Baction%5D=ical&tx_events_frontend%5Bcontroller%5D=Event&tx_events_frontend%5Bevent%5D=26&cHash=d38f8b752d27504bb578a1d8a361721a"; url = "https://www.exmatrikulationsamt.de/ics/v1/stuta.ics";
color = "#16182c"; color = "#7F7FFF";
}; };
riesa-efau = { exma-nawa = {
url = "https://scrape.hq.c3d2.de/riesa-efau-kalender.ics"; url = "https://www.exmatrikulationsamt.de/ics/v1/nawa.ics";
color = "#7FBF7F"; color = "#3F3FBF";
}; };
gartennetzwerk = { ratsinfo = {
url = "https://www.dresden-pflanzbar.de/?plugin=all-in-one-event-calendar&controller=ai1ec_exporter_controller&action=export_events&no_html=true"; url = "https://github.com/offenesdresden/dresden-ratsinfo/raw/master/meetings.ics";
color = "#3FAF00"; color = "#BFBF3F";
}; };
ffdd = { filmnaechte = {
url = "https://mobilizon.envs.net/@ffdd/feed/ics"; url = "https://dresden.filmnaechte.de/veranstaltung?tx_events_frontend%5Baction%5D=ical&tx_events_frontend%5Bcontroller%5D=Event&tx_events_frontend%5Bevent%5D=26&cHash=d38f8b752d27504bb578a1d8a361721a";
color = "#AFAF00"; color = "#16182c";
}; };
dhmd = { riesa-efau = {
url = "https://scrape.hq.c3d2.de/dhmd-veranstaltungen.ics"; url = "https://scrape.hq.c3d2.de/riesa-efau-kalender.ics";
color = "#E00728"; color = "#7FBF7F";
}; };
ds21 = { gartennetzwerk = {
url = "https://talks.datenspuren.de/ds21/schedule.ics"; url = "https://www.dresden-pflanzbar.de/?plugin=all-in-one-event-calendar&controller=ai1ec_exporter_controller&action=export_events&no_html=true";
color = "#40A940"; color = "#3FAF00";
}; };
medienkulturzentrum = { ffdd = {
url = "https://scrape.hq.c3d2.de/mkz-programm.ics"; url = "https://mobilizon.envs.net/@ffdd/feed/ics";
color = "#DF3FBF"; color = "#AFAF00";
}; };
ddosug = { dhmd = {
url = "https://www.meetup.com/de-DE/ddos-usergroup/events/ical/"; url = "https://scrape.hq.c3d2.de/dhmd-veranstaltungen.ics";
color = "#001F3F"; color = "#E00728";
}; };
diwo = { ds21 = {
url = "https://pretix.eu/diwoweek/events/ical/?locale=de"; url = "https://talks.datenspuren.de/ds21/schedule.ics";
color = "#723465"; color = "#40A940";
};
medienkulturzentrum = {
url = "https://scrape.hq.c3d2.de/mkz-programm.ics";
color = "#DF3FBF";
};
ddosug = {
url = "https://www.meetup.com/de-DE/ddos-usergroup/events/ical/";
color = "#001F3F";
};
diwo = {
url = "https://pretix.eu/diwoweek/events/ical/?locale=de";
color = "#723465";
};
};
}; };
}; };
} }