2020-08-10 23:45:26 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# Upgrade Doom Emacs daily
|
|
|
|
systemd.user.services.doom-upgrade = {
|
|
|
|
description = "Upgrade Doom Emacs";
|
|
|
|
wantedBy = [ "default.target" ];
|
2020-12-01 02:02:23 +01:00
|
|
|
path = with pkgs; [ bash emacsPgtkGcc 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
|
|
|
${pkgs.bash}/bin/bash -c "/home/coolneng/.emacs.d/bin/doom sync"
|
|
|
|
'';
|
2021-04-14 16:59:17 +02:00
|
|
|
serviceConfig.Type = "oneshot";
|
2020-08-10 23:45:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.timers.doom-upgrade = {
|
|
|
|
description = "Daily upgrade of Doom Emacs";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
timerConfig = {
|
2021-03-23 00:14:00 +01:00
|
|
|
OnCalendar = "22:00:00";
|
2020-08-10 23:45:26 +02:00
|
|
|
Unit = "doom-upgrade.service";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Clean up Doom Emacs monthly
|
|
|
|
systemd.user.services.doom-purge = {
|
|
|
|
description = "Purge Doom Emacs";
|
|
|
|
wantedBy = [ "default.target" ];
|
2020-12-01 02:02:23 +01:00
|
|
|
path = with pkgs; [ bash emacsPgtkGcc 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";
|
2020-08-10 23:45:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.timers.doom-purge = {
|
|
|
|
description = "Monthly purge of Doom Emacs";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
timerConfig = {
|
2021-03-30 18:22:41 +02:00
|
|
|
OnCalendar = "13-*-* 22:00:00";
|
2020-08-10 23:45:26 +02:00
|
|
|
Unit = "doom-purge.service";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Upgrade Neovim plugins weekly
|
|
|
|
systemd.user.services.vim-plug-upgrade = {
|
|
|
|
description = "Upgrade Vim-Plug";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
path = [ pkgs.git pkgs.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";
|
2020-08-10 23:45:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.timers.vim-plug-upgrade = {
|
|
|
|
description = "Weekly upgrade of Vim-Plug";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "Wed 18:00:00";
|
|
|
|
Unit = "vim-plug-upgrade.service";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|