summaryrefslogtreecommitdiffstats
path: root/shared/2configs/cgit-mirror.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-06 16:24:47 +0100
committertv <tv@krebsco.de>2016-02-06 16:24:47 +0100
commitfbf92edb0e5be4bba59d596d5c74b284de84a5fd (patch)
tree805a8c1efd64adf7efa72b33704fdca64a4d9862 /shared/2configs/cgit-mirror.nix
parentb16bfb9c99e6f1f063c5b7358003149db42b70e3 (diff)
parent4c23e33dea4d9901b64bf287983c43862f4990f2 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'shared/2configs/cgit-mirror.nix')
-rw-r--r--shared/2configs/cgit-mirror.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/shared/2configs/cgit-mirror.nix b/shared/2configs/cgit-mirror.nix
new file mode 100644
index 000000000..4ff1902f9
--- /dev/null
+++ b/shared/2configs/cgit-mirror.nix
@@ -0,0 +1,40 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ rules = with git; singleton {
+ user = [ git-sync ];
+ repo = [ stockholm-mirror ];
+ perm = push ''refs/*'' [ non-fast-forward create delete merge ];
+ };
+
+ stockholm-mirror = {
+ public = true;
+ name = "stockholm-mirror";
+ desc = "mirror for all stockholm branches";
+ hooks = {
+ post-receive = pkgs.git-hooks.irc-announce {
+ nick = config.networking.hostName;
+ verbose = false;
+ channel = "#retiolum";
+ server = "cd.retiolum";
+ };
+ };
+ };
+
+ git-sync = {
+ name = "git-sync";
+ mail = "spam@krebsco.de";
+ # TODO put git-sync pubkey somewhere more appropriate
+ pubkey = ''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzUuzyoAhMgJmsiaTVWNSXqcrZNTpKpv0nfFBOMcNXUWEbvfAq5eNpg5cX+P8eoYl6UQgfftbYi06flKK3yJdntxoZKLwJGgJt9NZr8yZTsiIfMG8XosvGNQtGPkBtpLusgmPpu7t2RQ9QrqumBvoUDGYEauKTslLwupp1QeyWKUGEhihn4CuqQKiPrz+9vbNd75XOfVZMggk3j4F7HScatmA+p1EQXWyq5Jj78jQN5ZIRnHjMQcIZ4DOz1U96atwSKMviI1xEZIODYfgoGjjiWYeEtKaLVPtSqtLRGI7l+RNouMfwHLdTWOJSlIdFncfPXC6R19hTll3UHeHLtqLP git-sync'';
+ };
+
+in {
+ krebs.git = {
+ enable = true;
+ root-title = "Shared Repos";
+ root-desc = "keep on krebsing";
+ inherit rules;
+ repos.stockholm-mirror = stockholm-mirror;
+ };
+}