1. 6

    Thank you for the write-up!

    What is your take on using cgit over something more complex like gitea? . Last time I looked into it, one of the things that made cgit interesting was the option to serve a static website instead of hosting a gitea instance with the overhead that comes with it. Do you see any other benefits of cgit that maybe I haven’t considered?

    1. 6

      Can’t speak for the OP, but one argument for cgit is that you can point it at any bare git repo you like, whereas gitea is much more “managed” - there’s a database with all the repos it knows about and metadata and stuff. My usual workflow for “private-ish” git repos is approximately ssh my-shell-host "cd /home/git && git init --bare repo.git", so cgit fits quite nicely into that

      If anyone’s interested in the equivalent steps to get a barebones cgit running on nixos with nginx/fastcgi, I have a (hacky but reasonably well-commented) nixos module at https://gist.github.com/telent/b3cddb5b69d1206cb130bbff56b4d5e0 which you are welcome to.

      1. 2

        There are also less “managed” options in the static world, if I understand your intended meaning correctly. For example, stagit produces a static sequence of html pages, although it’s somewhat more geared towards smaller projects.

      2. 4

        What is your take on using cgit over something more complex like gitea?

        Well, as you imply, simplicity is one argument.

        And cgit shouldn’t be static, that’s could be stagit. cgit can generate miscelanious diffs, which would be horrible to implement statically.

        1. 3

          What is your take on using cgit over something more complex like gitea?

          cgit is lesser in all ways: hardware requirements, the amount of management, complexity; and that is what i like about it. For a personal instance, such as mine, I have no need for users, organizations, activity feeds, web notifications and the variety of other features provided by gitea.

        1. 4

          Nice article! I just have a few minor suggestions that might avoid confusion for those learning from it:

          The browser selects the memory region normally reserved for the address bar.

          Just to note that “memory region” has a specific meaning that doesn’t apply here (ie. the equivalent of Linux’s vm_area_struct). Maybe “virtual memory address” would suit? Also, modern browsers don’t usually have a single address dedicated to the contents of the address bar (which seemed to be implied by “the memory […]”), because it’s not MT-Safe, which is fairly important nowadays with a separate main thread, UI thread, background task threads, etc.

          I also wonder if it might be worth mentioning SNI, since otherwise there appears to be a gap in the information in your TLS section (eg. “how can an abstract load balancer know which certificate to present before decryption?”). :-)

          1. 1

            This almost reminds me of a modern version of Terminus, which I have used for the last 15 years or so. Unfortunately now I’m spoiled to run at 6x12, and “smoothness” somewhat hinders in that kind of size.

            Also coincidentally I’ve been looking for a programming font like Terminus with CJK support, and now I see variant Sarasa Gothic linked in the readme. Interesting!

            1. 3

              FWIW, we (systemd) have also seen a number of problems with RDRAND as well. Probably the most notable was this issue where it was broken on some subset of AMD CPUs, which eventually was fixed by a microcode update. There’s a lot of good discussion in that issue about its uses, non-uses, and edge cases, with a good coverage of a lot of points of view on the subject.