From 669dd0b1f9731ad6dec89cf8eb88eb87c9c5354d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 9 Sep 2018 10:53:10 +0200 Subject: l: RIP repo-sync --- lass/1systems/mors/config.nix | 1 - lass/1systems/prism/config.nix | 1 - lass/2configs/repo-sync.nix | 144 ----------------------------------------- 3 files changed, 146 deletions(-) delete mode 100644 lass/2configs/repo-sync.nix diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 5a9c26b9d..aa10ed46e 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -21,7 +21,6 @@ with import ; - diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index 0f20d1c4e..f83721070 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -133,7 +133,6 @@ with import ; - diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix deleted file mode 100644 index 8b7d0db71..000000000 --- a/lass/2configs/repo-sync.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ config, lib, pkgs, ... }: - -with import ; - -let - mirror = "git@${config.networking.hostName}:"; - - defineRepo = name: announce: let - repo = { - public = true; - name = mkDefault "${name}"; - cgit.desc = mkDefault "mirror for ${name}"; - cgit.section = mkDefault "mirror"; - hooks = mkIf announce (mkDefault { - post-receive = pkgs.git-hooks.irc-announce { - nick = config.networking.hostName; - channel = "#xxx"; - refs = [ - "refs/heads/newest" - ]; - server = "irc.r"; - verbose = false; - }; - }); - }; - in { - rules = with git; [ - { - user = with config.krebs.users; [ - config.krebs.users."${config.networking.hostName}-repo-sync" - lass - lass-mors - lass-shodan - ]; - repo = [ repo ]; - perm = push ''refs/*'' [ non-fast-forward create delete merge ]; - } - { - user = attrValues config.krebs.users; - repo = [ repo ]; - perm = fetch; - } - ]; - repos."${name}" = repo; - }; - - sync-retiolum = name: - { - krebs.repo-sync.repos.${name} = { - branches = { - makefu = { - origin.url = "http://cgit.gum/${name}"; - mirror.url = "${mirror}${name}"; - }; - tv = { - origin.url = "http://cgit.ni.r/${name}"; - mirror.url = "${mirror}${name}"; - }; - nin = { - origin.url = "http://cgit.onondaga.r/${name}"; - mirror.url = "${mirror}${name}"; - }; - lassulus = { - origin.url = "http://cgit.lassul.us/${name}"; - mirror.url = "${mirror}${name}"; - }; - makefu-staging = { - origin.url = "http://cgit.gum/${name}"; - origin.ref = "heads/staging"; - mirror.url = "${mirror}${name}"; - }; - tv-staging = { - origin.url = "http://cgit.ni.r/${name}"; - origin.ref = "heads/staging"; - mirror.url = "${mirror}${name}"; - }; - nin-staging = { - origin.url = "http://cgit.onondaga.r/${name}"; - origin.ref = "heads/staging"; - mirror.url = "${mirror}${name}"; - }; - }; - latest = { - url = "${mirror}${name}"; - ref = "heads/newest"; - }; - }; - krebs.git = defineRepo name (config.networking.hostName == "prism"); - }; - - sync-remote = name: url: - { - krebs.repo-sync.repos.${name} = { - branches = { - remote = { - origin.url = url; - mirror.url = "${mirror}${name}"; - }; - }; - }; - krebs.git = defineRepo name (config.networking.hostName == "prism"); - }; - - sync-remote-silent = name: url: - { - krebs.repo-sync.repos.${name} = { - branches = { - remote = { - origin.url = url; - mirror.url = "${mirror}${name}"; - }; - }; - }; - krebs.git = defineRepo name false; - }; - -in { - krebs.repo-sync = { - enable = true; - unitConfig.ConditionPathExists = "!/var/run/ppp0.pid"; - }; - imports = [ - (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 "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-remote "realwallpaper" "https://github.com/lassulus/realwallpaper") - (sync-remote "lassulus-blog" "https://github.com/lassulus/lassulus-blog") - (sync-remote "painload" "https://github.com/krebs/painload") - (sync-remote "Reaktor" "https://github.com/krebs/Reaktor") - (sync-remote "nixos-wiki" "https://github.com/Mic92/nixos-wiki.wiki.git") - (sync-retiolum "go") - (sync-retiolum "much") - (sync-retiolum "newsbot-js") - (sync-retiolum "populate") - (sync-retiolum "stockholm") - (sync-retiolum "wai-middleware-time") - (sync-retiolum "xmonad-stockholm") - (sync-retiolum "nix-writers") - ]; -} -- cgit v1.2.3