summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--profiles/email/neomutt.nix4
-rw-r--r--profiles/station/caldav.nix33
2 files changed, 34 insertions, 3 deletions
diff --git a/profiles/email/neomutt.nix b/profiles/email/neomutt.nix
index 0420a2e..7ee2346 100644
--- a/profiles/email/neomutt.nix
+++ b/profiles/email/neomutt.nix
@@ -35,7 +35,7 @@
set date_format="%y/%m/%d %I:%M%p"
set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"
set smtp_authenticators = 'gssapi:login'
- set query_command = "abook --mutt-query '%s'"
+ set query_command = "echo %s | xargs khard email --parsable --"
set rfc2047_parameters = yes
set sleep_time = 0 # Pause 0 seconds for informational messages
set markers = no # Disables the `+` displayed at line wraps
@@ -179,8 +179,10 @@
{ map = ["pager"]; key = "\031"; action = "previous-line"; }
{ map = ["pager"]; key = "\005"; action = "next-line"; }
{ map = ["editor"]; key = "<Tab>"; action = "complete-query"; }
+ { map = ["editor"]; key = "\\Ct"; action = "complete"; }
];
macros = [
+ { map = ["index" "pager"]; key = ","; action = "<pipe-message>khard add-email<return>"; }
{ map = ["index"]; key = "X"; action = "<save-message>=Spam<enter>y"; }
{ map = ["index"]; key = "A"; action = "<modify-labels-then-hide>+archive -unread -inbox<enter><mark-message>z<enter><change-folder>^<enter>'z"; }
{ map = ["index"]; key = "D"; action = "<delete-message>"; }
diff --git a/profiles/station/caldav.nix b/profiles/station/caldav.nix
index 67a26d3..dc157c4 100644
--- a/profiles/station/caldav.nix
+++ b/profiles/station/caldav.nix
@@ -1,11 +1,20 @@
-{ lib, ... }: with lib; {
+{ config, lib, pkgs, ... }: with lib; {
+ environment.systemPackages = with pkgs; [khard];
hm = {
- accounts.calendar.basePath = "Cal";
+ xdg.configFile."khard/khard.conf".text = ''
+ [addressbooks]
+ [[mike]]
+ path = ${config.hm.accounts.contact.accounts.mike.local.path}/contacts
+
+ [general]
+ default_action=list
+ '';
services.vdirsyncer.enable = true;
programs = {
vdirsyncer.enable = true;
khal.enable = true;
};
+ accounts.calendar.basePath = "Cal";
accounts.calendar.accounts = {
mike = {
primary = true;
@@ -32,5 +41,25 @@
};
};
};
+ accounts.contact.basePath = "Cal";
+ accounts.contact.accounts = {
+ mike = {
+ local = {
+ type = "filesystem";
+ fileExt = ".vcf";
+ };
+ remote = {
+ type = "carddav";
+ url = "https://cal.${ivi.domain}";
+ userName = "mike";
+ passwordCommand = ["echo" "''"];
+ };
+ vdirsyncer = {
+ enable = true;
+ collections = ["contacts"];
+ conflictResolution = "remote wins";
+ };
+ };
+ };
};
}