From ed9aa0c32a5c14768f887b9c237ab80d7d6be254 Mon Sep 17 00:00:00 2001 From: sterni Date: Sun, 27 Nov 2022 15:00:06 +0100 Subject: feat(sterni/machines/edwin): categorize by project state in cgit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should make it a bit clearer where not a lot is to be expected – either yet or anymore. Change-Id: I8139213814f2645f376ef2175aa2bc3721ee1e51 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7442 Reviewed-by: sterni Autosubmit: sterni Tested-by: BuildkiteCI --- .../sterni/machines/edwin/http/code.sterni.lv.nix | 92 ++++++++++++++-------- 1 file changed, 57 insertions(+), 35 deletions(-) diff --git a/users/sterni/machines/edwin/http/code.sterni.lv.nix b/users/sterni/machines/edwin/http/code.sterni.lv.nix index 6c7e73cbc2..8b842c9976 100644 --- a/users/sterni/machines/edwin/http/code.sterni.lv.nix +++ b/users/sterni/machines/edwin/http/code.sterni.lv.nix @@ -4,41 +4,56 @@ let virtualHost = "code.sterni.lv"; - repos = { - spacecookie = { - description = "gopher server (and library for Haskell)"; - }; - gopher-proxy = { - description = "Gopher over HTTP proxy"; - }; - emoji-generic = { - description = "generic emoji library for Haskell (wip)"; - }; - grav2ty = { - description = "“realistic” 2d space game"; - }; - likely-music = { - description = "experimental application for probabilistic music composition"; - }; - logbook = { - description = "file format for keeping a personal log"; - }; - sternenblog = { - description = "file based cgi blog software"; - }; - haskell-dot-time = { - description = "UTC-centric time library for haskell with dot time support"; - defaultBranch = "main"; - }; - buchstabensuppe = { - description = "toy font rendering for low pixelcount, high contrast displays"; - defaultBranch = "main"; - }; - }; + repoSections = [ + { + section = "active"; + repos = { + spacecookie = { + description = "gopher server (and library for Haskell)"; + }; + }; + } + { + section = "poc"; + repos = { + emoji-generic = { + description = "generic emoji library for Haskell"; + }; + grav2ty = { + description = "“realistic” 2d space game"; + }; + haskell-dot-time = { + description = "UTC-centric time library for haskell with dot time support"; + defaultBranch = "main"; + }; + buchstabensuppe = { + description = "toy font rendering for low pixelcount, high contrast displays"; + defaultBranch = "main"; + }; + }; + } + { + section = "archive"; + repos = { + gopher-proxy = { + description = "Gopher over HTTP proxy"; + }; + likely-music = { + description = "experimental application for probabilistic music composition"; + }; + logbook = { + description = "file format for keeping a personal log"; + }; + sternenblog = { + description = "file based cgi blog software"; + }; + }; + } + ]; cgitRepoEntry = name: repo: let - repoName = repos.name or name; + repoName = repo.name or name; path = repo.path or "${repoName}.git"; in lib.concatStringsSep "\n" ( @@ -75,8 +90,7 @@ let enable-blame=1 enable-commit-graph=1 - root-title=code - root-desc=sterni's git repositories + root-title=code.sterni.lv css=/cgit.css head-include=${cgitHead} @@ -87,7 +101,15 @@ let readme=:README.md readme=:readme.md - ${builtins.concatStringsSep "\n\n" (lib.mapAttrsToList cgitRepoEntry repos)} + section-sort=0 + ${ + lib.concatMapStringsSep "\n" (section: + '' + section=${section.section} + '' + + builtins.concatStringsSep "\n\n" (lib.mapAttrsToList cgitRepoEntry section.repos) + ) repoSections + } ''; in -- cgit 1.4.1