From 42fe3941c2a02b4b1eb55dad4f83941a2708f77e Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 29 Dec 2022 14:35:07 +0100 Subject: feat(sterni/edwin/code.sterni.lv): disable commit graph for nixpkgs The commit graph can be quite slow for repositories like nixpkgs, so it is disabled there. For this we refactor the module a bit, allowing us to set arbitrary cgit settings for repositories. This feature can also handle all instances of defaultBranch now. Change-Id: I22e44b7398d2692e8cc16555fb5203ad6a7a69a9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7672 Reviewed-by: sterni Autosubmit: sterni Tested-by: BuildkiteCI --- users/sterni/machines/edwin/http/code.sterni.lv.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'users/sterni/machines/edwin/http') diff --git a/users/sterni/machines/edwin/http/code.sterni.lv.nix b/users/sterni/machines/edwin/http/code.sterni.lv.nix index 3325b04e7c71..56a7b4887484 100644 --- a/users/sterni/machines/edwin/http/code.sterni.lv.nix +++ b/users/sterni/machines/edwin/http/code.sterni.lv.nix @@ -14,7 +14,7 @@ let "mirror/depot" = { description = "monorepo for the virus lounge"; upstream = "https://code.tvl.fyi/depot.git"; - defaultBranch = "canon"; + cgit.defaultBranch = "canon"; }; "mirror/flipdot-gschichtler" = { description = "message queue system for OpenLab's flipdot display"; @@ -23,6 +23,7 @@ let "mirror/nixpkgs" = { description = "Nix packages collection"; upstream = "https://github.com/nixos/nixpkgs.git"; + cgit.enable-commit-graph = "0"; # too slow }; }; } @@ -39,11 +40,11 @@ let }; haskell-dot-time = { description = "UTC-centric time library for haskell with dot time support"; - defaultBranch = "main"; + cgit.defaultBranch = "main"; }; buchstabensuppe = { description = "toy font rendering for low pixelcount, high contrast displays"; - defaultBranch = "main"; + cgit.defaultBranch = "main"; upstream = "https://github.com/sternenseemann/buchstabensuppe.git"; }; "mirror/saneterm" = { @@ -53,6 +54,7 @@ let }; } { + # TODO(sterni): resisort, klammeraffe, cl-ca, ponify, tinyrl section = "archive"; repos = { gopher-proxy = { @@ -84,7 +86,7 @@ let "repo.path=${repoPath name repo}" ] ++ lib.optional (repo ? description) "repo.desc=${repo.description}" - ++ lib.optional (repo ? defaultBranch) "repo.defbranch=${repo.defaultBranch}" + ++ lib.mapAttrsToList (n: v: "repo.${n}=${v}") repo.cgit or { } ); cgitHead = pkgs.writeText "cgit-head.html" '' -- cgit 1.4.1