From 6ebd5f13e6ea9076eb917d06e19a2b216f75ca01 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 25 Jun 2016 13:10:13 +0200 Subject: l 2 repo-sync: fetch some remote repos --- lass/2configs/repo-sync.nix | 93 +++++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 33 deletions(-) diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix index bb5123a0..9b1e8053 100644 --- a/lass/2configs/repo-sync.nix +++ b/lass/2configs/repo-sync.nix @@ -5,7 +5,7 @@ with config.krebs.lib; let mirror = "git@${config.networking.hostName}:"; - sync = name: let + defineRepo = name: let repo = { public = true; name = mkDefault "${name}"; @@ -20,33 +20,52 @@ let }; }; in { - krebs.repo-sync.repos.${name} = { - makefu = { - origin.url = "http://cgit.gum/${name}"; - mirror.url = "${mirror}${name}"; - }; - tv = { - origin.url = "http://cgit.cd/${name}"; - mirror.url = "${mirror}${name}"; - }; - lassulus = { - origin.url = "http://cgit.prism/${name}"; - mirror.url = "${mirror}${name}"; - }; - "@latest" = { - mirror.url = "${mirror}${name}"; - mirror.ref = "heads/newest"; + rules = with git; singleton { + user = [ config.krebs.users."${config.networking.hostName}-repo-sync" ]; + repo = [ repo ]; + perm = push ''refs/*'' [ non-fast-forward create delete merge ]; + }; + repos."${name}" = repo; + }; + + sync-retiolum = name: + { + krebs.repo-sync.repos.${name} = { + makefu = { + origin.url = "http://cgit.gum/${name}"; + mirror.url = "${mirror}${name}"; + }; + tv = { + origin.url = "http://cgit.cd/${name}"; + mirror.url = "${mirror}${name}"; + }; + lassulus = { + origin.url = "http://cgit.prism/${name}"; + mirror.url = "${mirror}${name}"; + }; + "@latest" = { + mirror.url = "${mirror}${name}"; + mirror.ref = "heads/newest"; + }; }; + krebs.git = defineRepo name; }; - krebs.git = { - rules = with git; singleton { - user = [ config.krebs.users."${config.networking.hostName}-repo-sync" ]; - repo = [ repo ]; - perm = push ''refs/*'' [ non-fast-forward create delete merge ]; + + sync-remote = name: url: + { + krebs.repo-sync.repos.${name} = { + remote = { + origin.url = url; + mirror.url = "${mirror}${name}"; + }; + "@latest" = { + mirror.url = "${mirror}${name}"; + mirror.ref = "heads/newest"; + }; }; - repos."${name}" = repo; + krebs.git = defineRepo name; }; - }; + in { krebs.repo-sync = { @@ -54,15 +73,23 @@ in { privateKeyFile = toString ; }; imports = [ - (sync "stockholm") - (sync "realwallpaper") - (sync "xmonad-stockholm") - (sync "newsbot-js") - (sync "go") - (sync "wai-middleware-time") - (sync "web-routes-wai-custom") - (sync "much") - (sync "painload") + (sync-remote "array" "https://github.com/makefu/array") + (sync-remote "email-header" "https://github.com/4z3/email-header") + (sync-remote "mycube-flask" "https://github.com/makefu/mycube-flask") + (sync-remote "nixpkgs" "https://github.com/nixos/nixpkgs") + (sync-remote "reaktor-titlebot" "https://github.com/makefu/reaktor-titlebot") + (sync-remote "repo-sync" "https://github.com/makefu/repo-sync") + (sync-remote "skytraq-datalogger" "https://github.com/makefu/skytraq-datalogger") + (sync-remote "xintmap" "https://github.com/4z3/xintmap") + (sync-retiolum "go") + (sync-retiolum "much") + (sync-retiolum "newsbot-js") + (sync-retiolum "painload") + (sync-retiolum "realwallpaper") + (sync-retiolum "stockholm") + (sync-retiolum "wai-middleware-time") + (sync-retiolum "web-routes-wai-custom") + (sync-retiolum "xmonad-stockholm") ]; } -- cgit v1.2.3