mirror of
https://github.com/kmein/niveum
synced 2026-03-21 20:31:07 +01:00
feat: khard, vdirsyncer service
This commit is contained in:
@@ -6,21 +6,58 @@ let
|
|||||||
password = lib.fileContents <secrets/nextcloud/password>;
|
password = lib.fileContents <secrets/nextcloud/password>;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.khal pkgs.vdirsyncer ];
|
environment.systemPackages = [ pkgs.khal pkgs.vdirsyncer pkgs.khard ];
|
||||||
|
|
||||||
|
systemd.user.services.vdirsyncer = {
|
||||||
|
enable = true;
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
startAt = "*:00/10";
|
||||||
|
script = ''
|
||||||
|
${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
||||||
|
${pkgs.khal}/bin/khal printcalendars # https://lostpackets.de/khal/configure.html#syncing
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
|
"khard/khard.conf".text = ''
|
||||||
|
[addressbooks]
|
||||||
|
[[contacts]]
|
||||||
|
path = ${davHome}/contacts/contacts/
|
||||||
|
|
||||||
|
[general]
|
||||||
|
debug = no
|
||||||
|
default_action = list
|
||||||
|
editor = ${config.environment.variables.EDITOR}
|
||||||
|
merge_editor = ${pkgs.vim}/bin/vimdiff
|
||||||
|
|
||||||
|
[contact table]
|
||||||
|
display = first_name
|
||||||
|
group_by_addressbook = no
|
||||||
|
reverse = no
|
||||||
|
show_nicknames = no
|
||||||
|
show_uids = no
|
||||||
|
sort = last_name
|
||||||
|
localize_dates = yes
|
||||||
|
preferred_phone_number_type = pref, cell, home
|
||||||
|
preferred_email_address_type = pref, work, home
|
||||||
|
|
||||||
|
[vcard]
|
||||||
|
search_in_source_files = no
|
||||||
|
skip_unparsable = no
|
||||||
|
'';
|
||||||
|
|
||||||
"khal/config".text = ''
|
"khal/config".text = ''
|
||||||
[calendars]
|
[calendars]
|
||||||
|
|
||||||
[[kalender_local]]
|
[[kalender_local]]
|
||||||
path = ${davHome}/calendar/*
|
path = ${davHome}/calendar/*
|
||||||
color = 27
|
color = 32
|
||||||
type = discover
|
type = discover
|
||||||
|
|
||||||
[[kontakte_local]]
|
[[kontakte_local]]
|
||||||
path = ${davHome}/contacts/contacts/
|
path = ${davHome}/contacts/contacts/
|
||||||
color = 11
|
|
||||||
type = birthdays
|
type = birthdays
|
||||||
|
|
||||||
[default]
|
[default]
|
||||||
@@ -46,28 +83,30 @@ in
|
|||||||
a = "kontakte_local"
|
a = "kontakte_local"
|
||||||
b = "kontakte_cloud"
|
b = "kontakte_cloud"
|
||||||
collections = ["from a", "from b"]
|
collections = ["from a", "from b"]
|
||||||
|
conflict_resolution = "b wins"
|
||||||
|
|
||||||
|
[pair kalender]
|
||||||
|
a = "kalender_local"
|
||||||
|
b = "kalender_cloud"
|
||||||
|
collections = ["from a", "from b"]
|
||||||
|
conflict_resolution = "b wins"
|
||||||
|
|
||||||
[storage kontakte_local]
|
[storage kontakte_local]
|
||||||
type = "filesystem"
|
type = "filesystem"
|
||||||
path = "${davHome}/contacts/"
|
path = "${davHome}/contacts/"
|
||||||
fileext = ".vcf"
|
fileext = ".vcf"
|
||||||
|
|
||||||
|
[storage kalender_local]
|
||||||
|
type = "filesystem"
|
||||||
|
path = "${davHome}/calendar/"
|
||||||
|
fileext = ".ics"
|
||||||
|
|
||||||
[storage kontakte_cloud]
|
[storage kontakte_cloud]
|
||||||
type = "carddav"
|
type = "carddav"
|
||||||
url = "${davEndpoint}/addressbooks/users/${username}/contacts/"
|
url = "${davEndpoint}/addressbooks/users/${username}/contacts/"
|
||||||
username = "${username}"
|
username = "${username}"
|
||||||
password = "${password}"
|
password = "${password}"
|
||||||
|
|
||||||
[pair kalender]
|
|
||||||
a = "kalender_local"
|
|
||||||
b = "kalender_cloud"
|
|
||||||
collections = ["from a", "from b"]
|
|
||||||
|
|
||||||
[storage kalender_local]
|
|
||||||
type = "filesystem"
|
|
||||||
path = "${davHome}/calendar/"
|
|
||||||
fileext = ".ics"
|
|
||||||
|
|
||||||
[storage kalender_cloud]
|
[storage kalender_cloud]
|
||||||
type = "caldav"
|
type = "caldav"
|
||||||
url = "${davEndpoint}/calendars/${username}/personal/"
|
url = "${davEndpoint}/calendars/${username}/personal/"
|
||||||
|
|||||||
Reference in New Issue
Block a user