l 2 repo-sync: fetch some remote repos

This commit is contained in:
lassulus 2016-06-25 13:10:13 +02:00
parent 7089eea041
commit 6ebd5f13e6

View File

@ -5,7 +5,7 @@ with config.krebs.lib;
let let
mirror = "git@${config.networking.hostName}:"; mirror = "git@${config.networking.hostName}:";
sync = name: let defineRepo = name: let
repo = { repo = {
public = true; public = true;
name = mkDefault "${name}"; name = mkDefault "${name}";
@ -20,49 +20,76 @@ let
}; };
}; };
in { in {
krebs.repo-sync.repos.${name} = { rules = with git; singleton {
makefu = { user = [ config.krebs.users."${config.networking.hostName}-repo-sync" ];
origin.url = "http://cgit.gum/${name}"; repo = [ repo ];
mirror.url = "${mirror}${name}"; perm = push ''refs/*'' [ non-fast-forward create delete merge ];
};
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 = {
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;
}; };
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;
};
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";
};
};
krebs.git = defineRepo name;
};
in { in {
krebs.repo-sync = { krebs.repo-sync = {
enable = true; enable = true;
privateKeyFile = toString <secrets/repo-sync.key>; privateKeyFile = toString <secrets/repo-sync.key>;
}; };
imports = [ imports = [
(sync "stockholm") (sync-remote "array" "https://github.com/makefu/array")
(sync "realwallpaper") (sync-remote "email-header" "https://github.com/4z3/email-header")
(sync "xmonad-stockholm") (sync-remote "mycube-flask" "https://github.com/makefu/mycube-flask")
(sync "newsbot-js") (sync-remote "nixpkgs" "https://github.com/nixos/nixpkgs")
(sync "go") (sync-remote "reaktor-titlebot" "https://github.com/makefu/reaktor-titlebot")
(sync "wai-middleware-time") (sync-remote "repo-sync" "https://github.com/makefu/repo-sync")
(sync "web-routes-wai-custom") (sync-remote "skytraq-datalogger" "https://github.com/makefu/skytraq-datalogger")
(sync "much") (sync-remote "xintmap" "https://github.com/4z3/xintmap")
(sync "painload") (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")
]; ];
} }