Move user services to a new file
This commit is contained in:
parent
302863b446
commit
0633d8e304
@ -139,6 +139,7 @@
|
|||||||
./modules/audio.nix
|
./modules/audio.nix
|
||||||
./modules/development.nix
|
./modules/development.nix
|
||||||
./modules/printing.nix
|
./modules/printing.nix
|
||||||
|
./modules/periodic.nix
|
||||||
./modules/hardware-configuration.nix
|
./modules/hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -124,45 +124,4 @@ in {
|
|||||||
Unit = "doom-upgrade.service";
|
Unit = "doom-upgrade.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Clean up Doom Emacs monthly
|
|
||||||
systemd.user.services.doom-purge = {
|
|
||||||
description = "Purge Doom Emacs";
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
path = [ pkgs.emacs pkgs.git ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "/bin/sh /home/coolneng/.emacs.d/bin/doom purge";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.timers.doom-purge = {
|
|
||||||
description = "Monthly purge of Doom Emacs";
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "13 22:00: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 ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.neovim}/bin/nvim +PlugUpgrade +PlugUpdate +qa";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
45
modules/periodic.nix
Normal file
45
modules/periodic.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
# Clean up Doom Emacs monthly
|
||||||
|
systemd.user.services.doom-purge = {
|
||||||
|
description = "Purge Doom Emacs";
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
path = [ pkgs.emacs pkgs.git ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "/bin/sh /home/coolneng/.emacs.d/bin/doom purge";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.timers.doom-purge = {
|
||||||
|
description = "Monthly purge of Doom Emacs";
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "13 22:00: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 ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.neovim}/bin/nvim +PlugUpgrade +PlugUpdate +qa";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user