fmt
This commit is contained in:
parent
51a7660478
commit
8cc05e8e40
6 changed files with 38 additions and 39 deletions
|
|
@ -20,4 +20,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,25 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
calendarAggregate = pkgs.writers.writePython3 "calendar-aggregate.py" { libraries = [ pkgs.python3Packages.icalendar ]; } ''
|
calendarAggregate =
|
||||||
from pathlib import Path
|
pkgs.writers.writePython3 "calendar-aggregate.py"
|
||||||
from icalendar import Calendar
|
{ libraries = [ pkgs.python3Packages.icalendar ]; }
|
||||||
|
''
|
||||||
|
from pathlib import Path
|
||||||
|
from icalendar import Calendar
|
||||||
|
|
||||||
combined = Calendar()
|
combined = Calendar()
|
||||||
|
|
||||||
for path in Path("/var/lib/radicale/collections").rglob("*.ics"):
|
for path in Path("/var/lib/radicale/collections").rglob("*.ics"):
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
cal = Calendar.from_ical(f.read())
|
cal = Calendar.from_ical(f.read())
|
||||||
|
|
||||||
for component in cal.walk("VEVENT"):
|
for component in cal.walk("VEVENT"):
|
||||||
combined.add_component(component)
|
combined.add_component(component)
|
||||||
|
|
||||||
with open("/srv/www/calendar/all.ics", "wb") as f:
|
with open("/srv/www/calendar/all.ics", "wb") as f:
|
||||||
f.write(combined.to_ical())
|
f.write(combined.to_ical())
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -93,4 +96,3 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
settings = {
|
settings = {
|
||||||
homeserverUrl = "https://matrix.${config.networking.domain}";
|
homeserverUrl = "https://matrix.${config.networking.domain}";
|
||||||
#managementRoom = "!ZYWNuaQBkkenNklCSm:matrix.org"; # #cccb-moderators:berlin.ccc.de
|
#managementRoom = "!ZYWNuaQBkkenNklCSm:matrix.org"; # #cccb-moderators:berlin.ccc.de
|
||||||
managementRoom = "#cccb-moderators:berlin.ccc.de"; #"!ZYWNuaQBkkenNklCSm:matrix.org";
|
managementRoom = "#cccb-moderators:berlin.ccc.de"; # "!ZYWNuaQBkkenNklCSm:matrix.org";
|
||||||
autojoinOnlyIfManager = true;
|
autojoinOnlyIfManager = true;
|
||||||
recordIgnoredInvites = true;
|
recordIgnoredInvites = true;
|
||||||
roomStateBackingStore.enabled = true;
|
roomStateBackingStore.enabled = true;
|
||||||
|
|
|
||||||
|
|
@ -68,30 +68,30 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.virtualHosts."matrix.${config.networking.domain}" = {
|
nginx.virtualHosts."matrix.${config.networking.domain}" = {
|
||||||
default = true;
|
default = true;
|
||||||
quic = true;
|
quic = true;
|
||||||
kTLS = true;
|
kTLS = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations = {
|
locations = {
|
||||||
"/".return = "418 \"🫖\"";
|
"/".return = "418 \"🫖\"";
|
||||||
"~ ^(/_matrix|/_synapse/client)" = {
|
"~ ^(/_matrix|/_synapse/client)" = {
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
proxyPass = "http://[::1]:8008";
|
proxyPass = "http://[::1]:8008";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 64M;
|
client_max_body_size 64M;
|
||||||
proxy_set_header X-Request-ID $request_id;
|
proxy_set_header X-Request-ID $request_id;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"/_synapse/metrics" = {
|
"/_synapse/metrics" = {
|
||||||
proxyPass = "http://[::1]:9009";
|
proxyPass = "http://[::1]:9009";
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
allow 2001:678:760:cccb::14;
|
allow 2001:678:760:cccb::14;
|
||||||
allow 195.160.173.14;
|
allow 195.160.173.14;
|
||||||
deny all;
|
deny all;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,13 @@ let
|
||||||
|
|
||||||
${builtins.readFile ./caldav-export.py}
|
${builtins.readFile ./caldav-export.py}
|
||||||
'';
|
'';
|
||||||
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
|
pythonEnv = pkgs.python3.withPackages (
|
||||||
caldav
|
ps: with ps; [
|
||||||
icalendar
|
caldav
|
||||||
pyyaml
|
icalendar
|
||||||
]);
|
pyyaml
|
||||||
|
]
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd = {
|
systemd = {
|
||||||
|
|
@ -34,4 +36,3 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ in
|
||||||
_sql
|
_sql
|
||||||
_monitoring
|
_monitoring
|
||||||
];
|
];
|
||||||
"postgres-forgejo.age".publicKeys =
|
"postgres-forgejo.age".publicKeys = xengi ++ shokinn ++ [ _sql ];
|
||||||
xengi
|
|
||||||
++ shokinn
|
|
||||||
++ [ _sql ];
|
|
||||||
"postgres-extkuma.age".publicKeys = xengi ++ [ _sql ];
|
"postgres-extkuma.age".publicKeys = xengi ++ [ _sql ];
|
||||||
"postgres-baikal.age".publicKeys = xengi ++ [
|
"postgres-baikal.age".publicKeys = xengi ++ [
|
||||||
_sql
|
_sql
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue