Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { pkgs, ... }:
- {
- systemd = {
- timers.mirror-github = {
- wantedBy = [ "timers.target" ];
- partOf = [ "mirror-github.service" ];
- timerConfig.OnCalendar = "*:*:00,10,20,30";
- };
- services.mirror-github = {
- enable = true;
- serviceConfig = {
- Type = "oneshot";
- User = "keith";
- Group = "users";
- };
- path = [ pkgs.curl pkgs.jq pkgs.wget pkgs.strace ];
- environment = {
- DEBUG = "true";
- SRC_URL = "https://api.github.com/repos";
- MIRROR_DIR = "/opt/github";
- SECRET = "/run/secrets/github_mirror_personal_access_token";
- GET="tar,zip,assets";
- };
- script = ''
- #source ${./mirror.sh} OpenSmalltalk/opensmalltalk-vm
- source ${./mirror.sh} keithy/groan
- '';
- };
- };
- }
Add Comment
Please, Sign In to add comment