home | updated khard to use hm module

This commit is contained in:
Don Harper 2023-10-02 15:16:10 -05:00
parent c7f82da5cc
commit 234d46cb5f
2 changed files with 44 additions and 39 deletions

18
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1696063111,
"narHash": "sha256-F2IJEbyH3xG0eqyAYn9JoV+niqNz+xb4HICYNkkviNI=",
"lastModified": 1696145345,
"narHash": "sha256-3dM7I/d4751SLPJah0to1WBlWiyzIiuCEUwJqwBdmr4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ae896c810f501bf0c3a2fd7fc2de094dd0addf01",
"rev": "6f9b5b83ad1f470b3d11b8a9fe1d5ef68c7d0e30",
"type": "github"
},
"original": {
@ -23,11 +23,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1695887975,
"narHash": "sha256-u3+5FR12dI305jCMb0fJNQx2qwoQ54lv1tPoEWp0hmg=",
"lastModified": 1696161939,
"narHash": "sha256-HI1DxS//s46/qv9dcW06TzXaBjxL2DVTQP8R1QsnHzM=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "adcfd6aa860d1d129055039696bc457af7d50d0e",
"rev": "0ab3ee718e964fb42dc57ace6170f19cb0b66532",
"type": "github"
},
"original": {
@ -39,11 +39,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1695830400,
"narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=",
"lastModified": 1696019113,
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2",
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
"type": "github"
},
"original": {

View file

@ -1,31 +1,36 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ khard ];
xdg.configFile."khard/khard.conf".text = ''
[addressbooks]
[[contacts]]
path = ~/.config/vdirsyncer/storage/contacts/default
[general]
debug = no
default_action = list
editor = vim
merge_editor = 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]
private_objects = Jabber, Skype, Twitter, Mastodon
preferred_version = 3.0
search_in_source_files = no
skip_unparsable = no
'';
{ config, pkgs, ... }:
{
programs.khard = {
enable = true;
settings = {
general = {
default_action = "list";
editor = "${pkgs.neovim}/bin/nvim";
merge_editor = [ "${pkgs.neovim}/bin/nvim" "-d" ];
};
"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 = {
private_objects = [ "Jabber" "Skype" "Twitter" "Mastodon" ];
preferred_version = "3.0";
search_in_source_files = "no";
skip_unparsable = "no";
};
};
};
accounts.contact.accounts = {
contacts = {
khard.enable = true;
local.path = "~/.config/vdirsyncer/storage/contacts/default";
};
};
}