keithleigh

Untitled

May 10th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. { pkgs, ... }:
  2.  
  3. {
  4.  
  5. systemd = {
  6. timers.mirror-github = {
  7. wantedBy = [ "timers.target" ];
  8. partOf = [ "mirror-github.service" ];
  9. timerConfig.OnCalendar = "*:*:00,10,20,30";
  10. };
  11.  
  12. services.mirror-github = {
  13.  
  14. enable = true;
  15.  
  16. serviceConfig = {
  17. Type = "oneshot";
  18. User = "keith";
  19. Group = "users";
  20. };
  21.  
  22. path = [ pkgs.curl pkgs.jq pkgs.wget pkgs.strace ];
  23.  
  24. environment = {
  25. DEBUG = "true";
  26. SRC_URL = "https://api.github.com/repos";
  27. MIRROR_DIR = "/opt/github";
  28. SECRET = "/run/secrets/github_mirror_personal_access_token";
  29. GET="tar,zip,assets";
  30. };
  31.  
  32. script = ''
  33.  
  34. #source ${./mirror.sh} OpenSmalltalk/opensmalltalk-vm
  35. source ${./mirror.sh} keithy/groan
  36.  
  37. '';
  38.  
  39. };
  40. };
  41. }
Add Comment
Please, Sign In to add comment