khard dump working
This commit is contained in:
parent
c033c64135
commit
df972b037d
2 changed files with 31 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./khard-dump.nix ];
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nodePackages.typescript-language-server
|
nodePackages.typescript-language-server
|
||||||
marksman
|
marksman
|
||||||
|
|
@ -17,7 +18,7 @@
|
||||||
src = builtins.fetchGit {
|
src = builtins.fetchGit {
|
||||||
url = "ssh://git@shorbut.ktiu.net/home/git/woof.vim/";
|
url = "ssh://git@shorbut.ktiu.net/home/git/woof.vim/";
|
||||||
ref = "main";
|
ref = "main";
|
||||||
rev = "146eca695d0c3901905f4d46d9defd1f624dc193";
|
rev = "5c3f6675436e33e56e2f43ed8853925daaf1d011";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
||||||
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