2020-08-10 23:45:26 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2021-06-24 12:22:58 +02:00
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
let
|
|
|
|
emacs-vterm = ((emacsPackagesNgGen emacsPgtkGcc).emacsWithPackages
|
2021-08-09 02:11:33 +02:00
|
|
|
(epkgs: [ epkgs.vterm ]));
|
2021-06-24 12:22:58 +02:00
|
|
|
|
|
|
|
in {
|
2020-08-10 23:45:26 +02:00
|
|
|
# Upgrade Doom Emacs daily
|
|
|
|
systemd.user.services.doom-upgrade = {
|
|
|
|
description = "Upgrade Doom Emacs";
|
2021-06-24 12:22:58 +02:00
|
|
|
path = [ bash emacs-vterm git coreutils ];
|
2020-12-01 14:45:07 +01:00
|
|
|
script = ''
|
2021-02-16 21:08:25 +01:00
|
|
|
${pkgs.bash}/bin/bash -c "/home/coolneng/.emacs.d/bin/doom -y upgrade"
|
2020-12-01 14:45:07 +01:00
|
|
|
'';
|
2021-04-14 16:59:17 +02:00
|
|
|
serviceConfig.Type = "oneshot";
|
2021-04-29 16:46:14 +02:00
|
|
|
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";
|
2021-06-24 12:22:58 +02:00
|
|
|
path = [ bash emacs-vterm git coreutils ];
|
2020-12-22 00:26:04 +01:00
|
|
|
script = ''
|
2021-02-16 21:08:25 +01:00
|
|
|
${pkgs.bash}/bin/bash -c "/home/coolneng/.emacs.d/bin/doom -y purge"
|
2020-12-22 00:26:04 +01:00
|
|
|
'';
|
2021-04-14 16:59:17 +02:00
|
|
|
serviceConfig.Type = "oneshot";
|
2021-08-13 21:51:28 +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";
|
2021-08-09 02:11:33 +02:00
|
|
|
path = [ git neovim ];
|
2020-12-01 02:02:23 +01:00
|
|
|
script = "${pkgs.neovim}/bin/nvim +PlugUpgrade +PlugUpdate +qa";
|
2021-04-14 16:59:17 +02:00
|
|
|
serviceConfig.Type = "oneshot";
|
2021-04-29 16:46:14 +02:00
|
|
|
startAt = "Wed 18:00:00";
|
2020-08-10 23:45:26 +02:00
|
|
|
};
|
|
|
|
|
2021-04-29 16:46:14 +02:00
|
|
|
# Push password-store changes to git daily
|
2021-04-14 18:33:53 +02:00
|
|
|
systemd.user.services.password-store-push = {
|
|
|
|
description = "Push password-store changes to git";
|
2021-08-09 02:11:33 +02:00
|
|
|
path = [ pass-wayland git gitAndTools.pass-git-helper ];
|
2021-04-14 18:33:53 +02:00
|
|
|
script = "${pkgs.pass-wayland}/bin/pass git push";
|
|
|
|
serviceConfig.Type = "oneshot";
|
2021-04-29 16:46:14 +02:00
|
|
|
startAt = "18:00:00";
|
2021-04-14 18:33:53 +02: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" ];
|
2021-06-24 12:22:58 +02:00
|
|
|
path = [ goimapnotify pass-wayland isync notmuch ];
|
2021-06-18 16:26:51 +02:00
|
|
|
script = ''
|
|
|
|
${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/uni.conf
|
|
|
|
'';
|
2021-06-20 17:24:19 +02:00
|
|
|
serviceConfig = {
|
|
|
|
Type = "simple";
|
|
|
|
Restart = "always";
|
|
|
|
RestartSec = 20;
|
|
|
|
};
|
2021-06-18 16:26:51 +02:00
|
|
|
after = [ "network.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.services.goimapnotify-gmail = {
|
|
|
|
description = "Sync gmail mail using IMAP IDLE";
|
|
|
|
wantedBy = [ "default.target" ];
|
2021-06-24 12:22:58 +02:00
|
|
|
path = [ goimapnotify pass-wayland isync notmuch ];
|
2021-06-18 16:26:51 +02:00
|
|
|
script = ''
|
|
|
|
${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/gmail.conf
|
|
|
|
'';
|
2021-06-20 17:24:19 +02:00
|
|
|
serviceConfig = {
|
|
|
|
Type = "simple";
|
|
|
|
Restart = "always";
|
|
|
|
RestartSec = 20;
|
|
|
|
};
|
2021-06-18 16:26:51 +02:00
|
|
|
after = [ "network.target" ];
|
|
|
|
};
|
2020-08-10 23:45:26 +02:00
|
|
|
}
|