diff options
author | lassulus <lassulus@lassul.us> | 2021-02-03 23:18:38 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-02-03 23:18:38 +0100 |
commit | 0a53ef2a0d06bf347a24eb86132068289568e79c (patch) | |
tree | 923f3736a760190dcb79fea18be670062a822bad /tv/2configs/repo-sync | |
parent | 5d4e3a953e2c1f8a6c606640f7e8a94e4f64133d (diff) | |
parent | 61aebc5adcab3a174a6e27686c0c8fc7f65df513 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/2configs/repo-sync')
-rw-r--r-- | tv/2configs/repo-sync/wiki.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tv/2configs/repo-sync/wiki.nix b/tv/2configs/repo-sync/wiki.nix new file mode 100644 index 000000000..913439906 --- /dev/null +++ b/tv/2configs/repo-sync/wiki.nix @@ -0,0 +1,41 @@ +{ config, pkgs, ... }: let + lib = import <stockholm/lib>; +in { + krebs.repo-sync.enable = true; + krebs.repo-sync.repos.wiki.branches.hotdog = { + origin.url = "http://cgit.hotdog.r/wiki"; + mirror.url = "git@${config.krebs.build.host.name}.r:wiki"; + }; + krebs.git.repos.wiki = { + public = true; + name = "wiki"; + cgit.desc = toString [ + "mirror of" + config.krebs.repo-sync.repos.wiki.branches.hotdog.origin.url + ]; + cgit.section = "7. mirrors"; + hooks.post-receive = /* sh */ '' + ${pkgs.git-hooks.irc-announce { + channel = "#xxx"; + nick = config.krebs.build.host.name; + server = "irc.r"; + }} + ${pkgs.cgit-clear-cache.override { + inherit (config.krebs.git.cgit.settings) cache-root; + }}/bin/cgit-clear-cache + ''; + }; + krebs.git.rules = lib.singleton { + user = lib.singleton config.krebs.users.repo-sync; + repo = lib.singleton config.krebs.git.repos.wiki; + perm = lib.git.push "refs/*" [ + lib.git.create + lib.git.delete + lib.git.merge + lib.git.non-fast-forward + ]; + }; + krebs.users.${config.krebs.repo-sync.user.name}.pubkey = { + ni = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINK9U0Ob9/O0kxg3trhZY/vDnbqfN+R5cASGiClRr4IM"; + }.${config.krebs.build.host.name}; +} |