Starting a personal monorepo

I’ve been using Nix as my package manager for 4 years now and it has been the best computer-related decision I have ever made and, fortunately, for the past few years its ecosystem has been growing a lot1 , 2 , 3. Some of this movement is due to the advent of Flakes that makes it way easier to share reproducible outputs than the previous Nix solution of channels.

Considering that I can use Nix:

I thought to myself: “Why not build a personal monorepo”? I mean, this might sound like a weird conclusion to take from all of this but I can explain! I swear!

Rationale

Sometimes I just get bored setting up a new project. Create a new repository, setup the dependencies, write a CI manifest… it’s too tiresome! I won’t even mention the pain in the ass that is to write multiple projects on the multiple machines. The clone, fetch, pull and push dance is just too much when I could be coding already.

Most of my personal projects are written in Go, a really boring language that takes its time to include new features and release new versions. This means that an update won’t break them and that I can take advantage of a way to share the same compiler and tooling version through my projects.

If you’re a Nix user, a single command would show you all the outputs available for use: nix flake show sourcehut:~glorifiedgluer/monorepo. This also means that you can import this repo as an input on your flake.nix file and use any of my projects as you please.

The CI can be simplified to a simple shell conditional:

tasks:
  - someproject: |
      cd monorepo
      if ! $(git diff --quiet HEAD HEAD^ -- "someproject")
      then
        # do something if the project got an update
      fi      

Nonetheless, the best reason to try this is out is to have some fun and explore new challenges with version control and build systems! ;-)

Expectation

I mean… none? lol. Being serious now, I don’t expect my projects to become something used by hundreds or thousands of users as most of them are done out of passion/need. So the rationale above is composed of things that personally took out part of the joy of bulding out something and seeing it run.

Is this going to work? I have no idea as I don’t have much experience with monorepos. I’m not really sure if this is going to scale or bore me in other ways. The only certainty I have is that I’m having fun doing it right now!

You can see the repository on the links below:



Articles from blogs I follow around the net

The four tenets of SOA revisited

Twenty years after. In the January 2004 issue of MSDN Magazine you can find an article by Don Box titled A Guide to Developing and Running Connected Systems with Indigo. Buried within the (now dated) discussion of the technology…

via ploeh blog March 4, 2024

Building a demo of the Bleichenbacher RSA attack in Rust

Recently while reading Real-World Cryptography, I got nerd sniped1 by the mention of Bleichenbacher's attack on RSA. This is cool, how does it work? I had to understand, and to understand something, I usually have to build it. Well, friends, that is what…

via ntietz.com blog March 4, 2024

How to unbreak Dolphin on SteamOS after the QT6 update

A recent update to Dolphin made it switch to QT6. This makes it crash with this error or something like it: dolphin-emu: symbol lookup error: dolphin-emu: undefined symbol: _Zls6QDebugRK11QDockWidget, version Qt_6 This is fix…

via Xe Iaso's blog March 3, 2024

Generated by openring