panacea/modules/periodic.nix

67 lines
2.1 KiB
Nix
Raw Normal View History

2020-08-10 23:45:26 +02:00
{ config, lib, pkgs, ... }:
{
# Upgrade Doom Emacs daily
systemd.user.services.doom-upgrade = {
description = "Upgrade Doom Emacs";
path = with pkgs; [ bash emacsPgtkGcc git coreutils ];
2020-12-01 14:45:07 +01:00
script = ''
${pkgs.bash}/bin/bash -c "/home/coolneng/.emacs.d/bin/doom -y upgrade"
2020-12-01 14:45:07 +01:00
'';
serviceConfig.Type = "oneshot";
startAt = "22:00:00";
2020-08-10 23:45:26 +02:00
};
# Clean up Doom Emacs monthly
systemd.user.services.doom-purge = {
description = "Purge Doom Emacs";
path = with pkgs; [ bash emacsPgtkGcc git coreutils ];
2020-12-22 00:26:04 +01:00
script = ''
${pkgs.bash}/bin/bash -c "/home/coolneng/.emacs.d/bin/doom -y purge"
2020-12-22 00:26:04 +01:00
'';
serviceConfig.Type = "oneshot";
2021-05-06 01:58:43 +02:00
startAt = "13-*-* 20:00:00";
2020-08-10 23:45:26 +02:00
};
# Upgrade Neovim plugins weekly
systemd.user.services.vim-plug-upgrade = {
description = "Upgrade Vim-Plug";
path = [ pkgs.git pkgs.neovim ];
script = "${pkgs.neovim}/bin/nvim +PlugUpgrade +PlugUpdate +qa";
serviceConfig.Type = "oneshot";
startAt = "Wed 18:00:00";
2020-08-10 23:45:26 +02:00
};
# Push password-store changes to git daily
systemd.user.services.password-store-push = {
description = "Push password-store changes to git";
path = [ pkgs.pass-wayland pkgs.git pkgs.gitAndTools.pass-git-helper ];
script = "${pkgs.pass-wayland}/bin/pass git push";
serviceConfig.Type = "oneshot";
startAt = "18:00:00";
};
2021-06-18 16:26:51 +02:00
# Sync mail using IDLE
systemd.user.services.goimapnotify-uni = {
description = "Sync uni mail using IMAP IDLE";
wantedBy = [ "default.target" ];
path = with pkgs; [ goimapnotify pass-wayland isync notmuch ];
script = ''
${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/uni.conf
'';
serviceConfig.Type = "simple";
after = [ "network.target" ];
};
systemd.user.services.goimapnotify-gmail = {
description = "Sync gmail mail using IMAP IDLE";
wantedBy = [ "default.target" ];
path = with pkgs; [ goimapnotify pass-wayland isync notmuch ];
script = ''
${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/gmail.conf
'';
serviceConfig.Type = "simple";
after = [ "network.target" ];
};
2020-08-10 23:45:26 +02:00
}