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" ];
in {
c3d2.isInHq = false;
c3d2.autoUpdate = true;
c3d2 = {
isInHq = false;
autoUpdate = true;
};
networking.hostName = "scrape";
networking.interfaces.eth0.ipv4.addresses = [{
address = "172.20.73.32";
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
}];
networking.defaultGateway = "172.20.73.1";
# Required for deployment
services.openssh.enable = true;
networking = {
hostName = "scrape";
interfaces.eth0.ipv4.addresses = [{
address = "172.20.73.32";
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
}];
defaultGateway = "172.20.73.1";
};
users.groups.scrape = {};
users.users.scrape = {

View File

@ -2,132 +2,144 @@
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;
services.nginx.enable = true;
services.nginx.virtualHosts."ticker.c3d2.de" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8400";
boot = {
isContainer = true;
loader.initScript.enable = true;
};
services.ticker.updateInterval = "hourly";
services.ticker.config.calendars = {
c3d2 = {
url = "https://c3d2.de/ical.ics";
color = "#BFA73F";
networking = {
interfaces.eth0 = {
ipv4.addresses = [{ address = "172.20.73.52"; prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len; }];
useDHCP = false;
};
dresden-science = {
url = "https://www.dresden-science-calendar.de/calendar/de/iCalSync.ics";
color = "#00007F";
defaultGateway = "172.20.73.1";
nameservers = [ "172.20.73.8" "9.9.9.9" ];
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/";
color = "#00BF00";
};
stura-htw = {
url = "http://www.stura.htw-dresden.de/events/aggregator/ics_view";
color = "#BF3FA7";
};
malobeo = {
url = "https://malobeo.org/events/list/?ical=1&tribe_display=all";
color = "#FF3F3F";
};
hicknhack = {
url = "https://www.google.com/calendar/ical/grhnk1uaotql6gv2dkf9ldmqjc%40group.calendar.google.com/public/basic.ics";
color = "#A700A7";
};
palaissommer = {
url = "https://palaissommer.de/programm/?event=all";
color = "#7F003F";
};
kreta = {
url = "https://www.kreta-dresden.org/kreta.ics";
color = "#BF3F7F";
};
zentralwerk = {
url = "https://ics.teamup.com/feed/ksayh65fgotv2prcas/0.ics";
color = "#FF3F3F";
};
and = {
url = "https://and.notraces.net/events/?ical=1";
color = "#FF7F00";
};
rosenwerk-home = {
url = "https://www.google.com/calendar/ical/bj85d742g31mgkblbaiusmk3s8%40group.calendar.google.com/public/basic.ics";
color = "#DF003F";
};
rosenwerk-kultur = {
url = "https://www.google.com/calendar/ical/93enn926ddhgr79hnqp83ipj3g%40group.calendar.google.com/public/basic.ics";
color = "#BF001F";
};
haengemathe = {
url = "https://club-haengemathe.de/termine.ics";
color = "#FF7F3F";
};
bitsundbaeumedresden = {
url = "https://dresden.bits-und-baeume.org/termine.ics";
color = "#3FBF3F";
};
exma-stuta = {
url = "https://www.exmatrikulationsamt.de/ics/v1/stuta.ics";
color = "#7F7FFF";
};
exma-nawa = {
url = "https://www.exmatrikulationsamt.de/ics/v1/nawa.ics";
color = "#3F3FBF";
};
ratsinfo = {
url = "https://github.com/offenesdresden/dresden-ratsinfo/raw/master/meetings.ics";
color = "#BFBF3F";
};
filmnaechte = {
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 = "#16182c";
};
riesa-efau = {
url = "https://scrape.hq.c3d2.de/riesa-efau-kalender.ics";
color = "#7FBF7F";
};
gartennetzwerk = {
url = "https://www.dresden-pflanzbar.de/?plugin=all-in-one-event-calendar&controller=ai1ec_exporter_controller&action=export_events&no_html=true";
color = "#3FAF00";
};
ffdd = {
url = "https://mobilizon.envs.net/@ffdd/feed/ics";
color = "#AFAF00";
};
dhmd = {
url = "https://scrape.hq.c3d2.de/dhmd-veranstaltungen.ics";
color = "#E00728";
};
ds21 = {
url = "https://talks.datenspuren.de/ds21/schedule.ics";
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";
ticker = {
updateInterval = "hourly";
config.calendars = {
c3d2 = {
url = "https://c3d2.de/ical.ics";
color = "#BFA73F";
};
dresden-science = {
url = "https://www.dresden-science-calendar.de/calendar/de/iCalSync.ics";
color = "#00007F";
};
gruenes-brett = {
url = "https://dresden.gruenesbrett.net/ical/all/";
color = "#00BF00";
};
stura-htw = {
url = "http://www.stura.htw-dresden.de/events/aggregator/ics_view";
color = "#BF3FA7";
};
malobeo = {
url = "https://malobeo.org/events/list/?ical=1&tribe_display=all";
color = "#FF3F3F";
};
hicknhack = {
url = "https://www.google.com/calendar/ical/grhnk1uaotql6gv2dkf9ldmqjc%40group.calendar.google.com/public/basic.ics";
color = "#A700A7";
};
palaissommer = {
url = "https://palaissommer.de/programm/?event=all";
color = "#7F003F";
};
kreta = {
url = "https://www.kreta-dresden.org/kreta.ics";
color = "#BF3F7F";
};
zentralwerk = {
url = "https://ics.teamup.com/feed/ksayh65fgotv2prcas/0.ics";
color = "#FF3F3F";
};
and = {
url = "https://and.notraces.net/events/?ical=1";
color = "#FF7F00";
};
rosenwerk-home = {
url = "https://www.google.com/calendar/ical/bj85d742g31mgkblbaiusmk3s8%40group.calendar.google.com/public/basic.ics";
color = "#DF003F";
};
rosenwerk-kultur = {
url = "https://www.google.com/calendar/ical/93enn926ddhgr79hnqp83ipj3g%40group.calendar.google.com/public/basic.ics";
color = "#BF001F";
};
haengemathe = {
url = "https://club-haengemathe.de/termine.ics";
color = "#FF7F3F";
};
bitsundbaeumedresden = {
url = "https://dresden.bits-und-baeume.org/termine.ics";
color = "#3FBF3F";
};
exma-stuta = {
url = "https://www.exmatrikulationsamt.de/ics/v1/stuta.ics";
color = "#7F7FFF";
};
exma-nawa = {
url = "https://www.exmatrikulationsamt.de/ics/v1/nawa.ics";
color = "#3F3FBF";
};
ratsinfo = {
url = "https://github.com/offenesdresden/dresden-ratsinfo/raw/master/meetings.ics";
color = "#BFBF3F";
};
filmnaechte = {
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 = "#16182c";
};
riesa-efau = {
url = "https://scrape.hq.c3d2.de/riesa-efau-kalender.ics";
color = "#7FBF7F";
};
gartennetzwerk = {
url = "https://www.dresden-pflanzbar.de/?plugin=all-in-one-event-calendar&controller=ai1ec_exporter_controller&action=export_events&no_html=true";
color = "#3FAF00";
};
ffdd = {
url = "https://mobilizon.envs.net/@ffdd/feed/ics";
color = "#AFAF00";
};
dhmd = {
url = "https://scrape.hq.c3d2.de/dhmd-veranstaltungen.ics";
color = "#E00728";
};
ds21 = {
url = "https://talks.datenspuren.de/ds21/schedule.ics";
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";
};
};
};
};
}