Live Linux: lsblk output From the Live Linux, you can now access and modify all your drives/partitions. In this case, /dev/nvme0n1p3 is the root partition of the installed Linux system.

What is a Live Linux, Where do I get it?

In my mission on making things easily googleable and helping others, I have a new blog post for you today. From time to time, one needs to boot into a Live Linux (also “Linux Live system”) to repair things that can’t be repaired from a running Linux system, to test a new Linux distribution, or to update the partition scheme of your system’s main drive. But I think that with the existing guides Read more…

I switched to another NixOS Configuration and deleted my main user

… Now I can’t log in and my system is broken. This is what essentially happened to me recently 😄. Luckily, I was able to fix my system. But let’s go through what happened step by step. Disclaimer: This guide is not meant for absolute Linux beginners. To follow the guide, you need to understand the basics of NixOS, how to work with a shell, and how to mount partitions. Also, this guide Read more…

Properly configure `typos` in `pre-commit-hooks.nix` (now `git-hooks.nix`)

2024-04: Ongoing Upstream Discussion There is an ongoing upstream discussion for a pull request of mine that tries to mitigate this issues of the typos integration with pre-commit-hooks.nix I present in the following. I don’t know if it is ever getting merged – many opinions, limited time, stressed maintainers, complicated edge cases, different valid variants of usage of typos, stressed me – not blaming anyone!. However, IMHO, you should configure typos as follows, Read more…

Set CTest Arguments from CMake (for `make test`)

Just a quick follow-up to my previous post. It was somehow trickier than I thought to set arguments for CTest from CMake. In the end, the solution is quite simple, but existing resources weren’t as helpful as they should. For reference: If you type $ ninja test or $ make test in the generated build directory from CMake, CTest is invoked under the hood. By setting CMAKE_CTEST_ARGUMENTS at the right place in your Read more…

Set CTest arguments from CMake (Code Snippet).
Code snippet: Installing Catch2 from and using it in a CMake-project in GitHub CI

CMake-Project with Catch2 (v3) Unit Tests + Testing in GitHub CI

Hey you all, it’s been a while. Happy new year! In today’s blog post, I’d like to present you the solution for a problem I encountered. It’s not rocket science, but I didn’t find something helpful on the internet, and I love to make things easily googleable. TL;DR: Check out my example project on GitHub. I was working on a CMake-based project that builds libraries, which should be tested. These unit tests are Read more…

Nix Overlays: Add attribute to “lib” and avoid “infinite recursion error”

The other day, I was about to add an attribute to pkgs.lib using a nixpkgs overlay. There is a small and subtle pitfall when doing so, which made me create this short blog post. A basic overlay looks like this: By looking at the architecture diagram, we see that both prev and final refer to what pkgs is, just in different “generations” (or iteration steps) in the evaluation of the final nixpkgs instance. Read more…