hosts+home: add radicale

This commit is contained in:
Gabriel Fontes
2022-09-12 10:09:56 -03:00
parent e74f58c393
commit 4b73bab9d8
5 changed files with 46 additions and 9 deletions
+1 -1
View File
@@ -110,7 +110,7 @@
bind=SUPER,d,exec,${menu.run-cmd}
bind=,Scroll_Lock,exec,${menu.password-cmd} # fn+k
bind=,XF86Calculator,exec,${menu.password-cmd} # fn+f12
bind=SUPER,c,exec,${terminal.cmd-spawn "${pkgs.bc}/bin/bc"}
bind=SUPER,c,exec,${terminal.cmd-spawn "${pkgs.bc}/bin/bc -l"}
# Toggle waybar
bind=,XF86Tools,exec,${pkgs.procps}/bin/pkill -USR1 waybar # profile button
+6 -6
View File
@@ -25,9 +25,9 @@ in {
[storage contacts_remote]
type = "carddav"
url = "https://carddav.fastmail.com/dav"
username = "gabriel@gsfontes.com"
password.fetch = ["command", "${pass}", "carddav.fastmail.com/gabriel@gsfontes.com"]
url = "https://dav.m7.rs"
username = "hi@m7.rs"
password.fetch = ["command", "${pass}", "mail.m7.rs/hi@m7.rs"]
[pair calendars]
a = "calendars_local"
@@ -43,8 +43,8 @@ in {
[storage calendars_remote]
type = "caldav"
url = "https://caldav.fastmail.com/dav"
username = "gabriel@gsfontes.com"
password.fetch = ["command", "${pass}", "caldav.fastmail.com/gabriel@gsfontes.com"]
url = "https://dav.m7.rs"
username = "hi@m7.rs"
password.fetch = ["command", "${pass}", "mail.m7.rs/hi@m7.rs"]
'';
}
+3 -2
View File
@@ -1,4 +1,5 @@
gabriel-mail-password: ENC[AES256_GCM,data:n0zRRyRS7hhPBwTHYNOeo4BNg/VIAKP8d5eVDtIb3DsAkC/IbgvSRYqshNPI2Cazx3bNz63CViC1Qbja,iv:b13Huv2snF4e6qC15+UbLr4JpWrS8cRGfQ+Lp+v2kfk=,tag:jisoAOZQeMG991tjQ9LeIA==,type:str]
radicale-htpasswd: ENC[AES256_GCM,data:MHwdSjRUPmrwdUXn3rZcF+QVvH0ZeuIqtmQhe6mHy0td9vvEZ1Jhrk0Bd5IYAN5v4+bg9KPt7qLrUELoP3+ER9LQdi2b,iv:h+Tl/yyf+LV1z02LX/kWH42C1d1s0E80XZeG6Hkhnxo=,tag:rWw5j4H1QW+I0wObIZdaew==,type:str]
smtp-relay-creds: ENC[AES256_GCM,data:cipJ1wFByGBkZmwzi1gHVt5U21xC4r01fSkpQlU0UF6CFPhHwresFXw+Igwj5pEFfEh8SxKkI8TFozk=,iv:tJZa2lExFj5DMyD/h5qAhdqYWML1EQRWKQ+Z6zuSmWQ=,tag:ssFRfLL8Zbp0XUkOJ1+pbw==,type:str]
sops:
kms: []
@@ -15,8 +16,8 @@ sops:
VXNWcDcwTGVUL2pNTzgrMit0UkN0c0UKWY6XqH0WgJfzwbX4mO3OBIDEcsSktZyq
TRqZuGF/6/4o1D0F2wQBpoB7Wja2FLnsrJP060EpX0K870AK3zfWgw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2022-09-10T02:10:34Z"
mac: ENC[AES256_GCM,data:a1nI8ra5k5x3XPcz0u/21VTZxs9vvuH2DEzpPjW1Qqbl9YxfPGFlEaVezTKVPQeYgItOCxBiJpsoKMx3HBxNvvietqt4yPxL4u/Rj6xI1nHkgzM2jiruFDumkxxBC558kWUi+7sMYFaq9vmX186fdAwLWfbuadCsRDlCOWwBDeQ=,iv:qhdpSmH1Dcpx5FGo6JtqAHTJrbBZLDIBrNtE/Zhda0A=,tag:5N4WFfwmHOvi1K90kbIY0w==,type:str]
lastmodified: "2022-09-10T17:25:05Z"
mac: ENC[AES256_GCM,data:m7+H3z7Ey8UJ4YgyEII+pRKn6P4AX0DpErkP/UiUL9dUkhP7TuxYTlIA2x8ZqT8Mmgab6LLvD137SaiMSR00aHYd83wUEzgnFPIUe1+sHNK6lelx/3N8rXPZwm8RhTKHtgwhX1jM9HPJG+sH/X0VDJyz/RWGOHDTFqgmVVEkxUg=,iv:TZJdBm7VzqGk1xC92z7vooqGCGMrv7ndfnGrKQ1OaEg=,tag:iAh79mb3wpL3ZLKHsERo8g==,type:str]
pgp:
- created_at: "2022-08-18T23:29:03Z"
enc: |-
+1
View File
@@ -5,6 +5,7 @@
./headscale.nix
./mail.nix
./nginx.nix
./radicale.nix
./website.nix
];
}
+35
View File
@@ -0,0 +1,35 @@
{ config, ... }:
let
port = "5232";
in
{
services = {
radicale = {
enable = true;
settings = {
auth = {
type = "htpasswd";
htpasswd_filename = config.sops.secrets.radicale-htpasswd.path;
htpasswd_encryption = "bcrypt";
};
};
};
nginx.virtualHosts = {
"dav.m7.rs" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:${port}";
extraConfig = ''
proxy_set_header X-Script-Name /;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Authorization;
'';
};
};
};
sops.secrets.radicale-htpasswd = {
sopsFile = ../secrets.yaml;
owner = config.users.users.radicale.name;
group = config.users.users.radicale.group;
};
}