feat: add calendar and contacts modules
This commit is contained in:
parent
93f8b84d73
commit
9f1cf602e5
6 changed files with 117 additions and 0 deletions
50
modules/profiles/personal_contacts.nix
Normal file
50
modules/profiles/personal_contacts.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.profiles.personal;
|
||||
in
|
||||
{
|
||||
options.my.profiles.personal.contacts = mkEnableOption "contacts";
|
||||
|
||||
config = mkIf cfg.contacts {
|
||||
home-manager.users.moritz = {
|
||||
programs.khard.enable = true;
|
||||
programs.vdirsyncer.enable = true;
|
||||
services.vdirsyncer.enable = true;
|
||||
programs.aerc.extraConfig.compose.address-book-cmd = "khard email --remove-first-line --parsable %s";
|
||||
accounts.contact = {
|
||||
basePath = "Documents/Contacts";
|
||||
accounts.personal = {
|
||||
local = {
|
||||
type = "filesystem";
|
||||
fileExt = ".vcf";
|
||||
};
|
||||
remote = {
|
||||
passwordCommand = [ "cat" "/run/agenix/nextcloud" ];
|
||||
url = "https://nextcloud.moritzboeh.me/remote.php/dav";
|
||||
type = "carddav";
|
||||
userName = "moritz";
|
||||
};
|
||||
khard.enable = true;
|
||||
khard.defaultCollection = "contacts";
|
||||
vdirsyncer.enable = true;
|
||||
vdirsyncer.collections = [
|
||||
# "z-app-generated--contactsinteraction--recent" # Recently contacted
|
||||
# "z-server-generated--system" # Accounts
|
||||
"contacts" # Contacts
|
||||
];
|
||||
vdirsyncer.conflictResolution = [ "vimdiff" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
age.secrets.nextcloud = {
|
||||
file = ../../secrets/nextcloud.age;
|
||||
owner = "1000";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue