khard dump working
This commit is contained in:
parent
c033c64135
commit
df972b037d
2 changed files with 31 additions and 1 deletions
29
home/nvim/khard-dump.nix
Normal file
29
home/nvim/khard-dump.nix
Normal 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
|
||||
''}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue