This commit is contained in:
Till 2026-01-28 14:00:40 +01:00
parent 7f9c096123
commit 26ed81dbee
36 changed files with 165 additions and 207 deletions

29
home/khard-dump.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
systemd.user.timers = {
khard-dump = {
Unit = {
Description = "Timer to run khard-dump service";
};
Timer = {
OnCalendar = "*:00/10";
Unit = "khard-dump.service";
};
};
};
systemd.user.services = {
khard-dump = {
Unit = {
Description = "Dumps contact info to custom cache file";
};
Service = {
ExecStart = "${pkgs.writeScript "khard-dump" ''
#! ${pkgs.stdenv.shell}
${pkgs.khard.outPath}/bin/khard email --parsable --remove-first-line | awk 'BEGIN{FS=OFS="\t"}{print $2, $1}\' > ${config.xdg.cacheHome}/khard-dump
''}";
};
};
};
}