mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-01 16:26:51 +01:00
Enable moodle-dl
This commit is contained in:
parent
0892872e77
commit
40f010ce7d
2 changed files with 28 additions and 2 deletions
|
@ -114,8 +114,9 @@
|
|||
./modules/minecraft-server
|
||||
./modules/kate
|
||||
./modules/theming
|
||||
#./modules/auto-update
|
||||
#./modules/services/repo-sync
|
||||
./modules/auto-update
|
||||
./modules/services/repo-sync
|
||||
./modules/services/moodle-dl
|
||||
./modules/users/jopejoe1
|
||||
./modules/users/root
|
||||
./overlays
|
||||
|
|
25
modules/services/moodle-dl/default.nix
Normal file
25
modules/services/moodle-dl/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.timers."moodle-dl" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "5m";
|
||||
OnUnitActiveSec = "6h";
|
||||
Unit = "moodle-dl.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."moodle-dl" = {
|
||||
script = ''
|
||||
${lib.getExe pkgs.moodle-dl}
|
||||
${lib.getExe pkgs.git} -C /var/moodle-dl add *
|
||||
${lib.getExe pkgs.git} -C /var/moodle-dl commit -m "moodle-dl updated on `$(${pkgs.coreutils}/bin/date)`"
|
||||
'';
|
||||
path = [pkgs.openssh];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue