From 1c7a8ae0e5efa6df990ee791055e71548742b772 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 28 Sep 2023 11:05:14 +0100 Subject: [PATCH] Add calendar and contacts for ukaea Temp disable vdirsyncer on Ronin as davmail currently isn't working properly for caldav/carddav --- hosts/Ronin/home.nix | 110 +++++++++++++++++++++++++++++-------------- 1 file changed, 74 insertions(+), 36 deletions(-) diff --git a/hosts/Ronin/home.nix b/hosts/Ronin/home.nix index ea5d1c01..cbc88045 100644 --- a/hosts/Ronin/home.nix +++ b/hosts/Ronin/home.nix @@ -21,46 +21,84 @@ "https://nucleus.ukaea.uk"; }; programs.mbsync.groups.inboxes.ukaea = [ "INBOX" ]; - accounts.email.accounts = { - proton.primary = lib.mkForce false; - ukaea = let - host = "127.0.0.1"; - tls.enable = false; - in rec { - inherit (config.accounts.email.accounts.proton) realName; - maildir.path = "UKAEA"; - imap = { - inherit host tls; - port = 1144; - }; - smtp = { - inherit host tls; - port = 1026; - }; - address = "evie.litherland-smith@ukaea.uk"; - passwordCommand = "${pkgs.pass}/bin/pass show Mail/Outlook/ukaea"; - primary = true; - userName = address; - mbsync = { - enable = true; - create = "both"; - expunge = "both"; - remove = "both"; - patterns = [ "*" "!Junk" "!Snoozed" "!Sync Issues" "!Unsent Messages" ]; - subFolders = "Verbatim"; - extraConfig.account.AuthMechs = "LOGIN"; - }; - msmtp = { - enable = true; - extraConfig = { - tls = "off"; - auth = "login"; + accounts = { + email.accounts = { + proton.primary = lib.mkForce false; + ukaea = let + host = "127.0.0.1"; + tls.enable = false; + in rec { + inherit (config.accounts.email.accounts.proton) realName; + maildir.path = "UKAEA"; + imap = { + inherit host tls; + port = 1144; }; + smtp = { + inherit host tls; + port = 1026; + }; + address = "evie.litherland-smith@ukaea.uk"; + passwordCommand = "${pkgs.pass}/bin/pass show Mail/Outlook/ukaea"; + primary = true; + userName = address; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + remove = "both"; + patterns = + [ "*" "!Junk" "!Snoozed" "!Sync Issues" "!Unsent Messages" ]; + subFolders = "Verbatim"; + extraConfig.account.AuthMechs = "LOGIN"; + }; + msmtp = { + enable = true; + extraConfig = { + tls = "off"; + auth = "login"; + }; + }; + mu.enable = true; + notmuch.enable = true; + }; + }; + calendar.accounts.ukaea = { + local = { + type = "filesystem"; + fileExt = ".ics"; + }; + remote = rec { + inherit (config.accounts.email.accounts.ukaea) userName passwordCommand; + type = "caldav"; + url = "http://localhost:1080/users/${userName}/calendar/"; + }; + vdirsyncer = { + enable = true; + collections = [ "from a" ]; + }; + khal = { + enable = true; + type = "discover"; + }; + }; + contact.accounts.ukaea = { + local = { + type = "filesystem"; + fileExt = ".vcf"; + }; + remote = rec { + inherit (config.accounts.email.accounts.ukaea) userName passwordCommand; + type = "carddav"; + url = "http://localhost:1080/users/${userName}/contacts/"; + }; + vdirsyncer = { + enable = true; + collections = [ "from a" ]; }; - mu.enable = true; - notmuch.enable = true; }; }; + services.vdirsyncer.enable = lib.mkForce false; # TEMP until fixed services.kanshi.profiles = { undocked = { outputs = [