Jacek's Blog

Software Engineering Consultant

Jacek Galowicz's Posts tagged "nix"

Single-Command Server Bootstrapping

April 5, 2023 nix

When you spin up a new VM or bare metal server at some cloud provider, what is the fastest and easiest way to get the server to run a certain configuration? In this article, I show how to do the partitioning, formatting, and installing a fully configured NixOS, starting from a random rescue system, in 5 minutes and with literally a single command: nixos-anywhere.

Read more

Quick VMs with NixOS

March 13, 2023 nix

Very often during development, it is useful to run your code in a scenario that is as near to a final deployment as possible, but not in some cloud environment where it’s hard to change specific parts without going through the full CI/CD chain. I find it very useful to quickly build, run, iterate, rebuild, and rerun VMs with NixOS Linux on my development machines. This week I demonstrate this aspect of my workflow with NixOS.

Read more

Simple Project Documentation with MkDocs, PlantUML, and PlantUML-C4 Integration

February 20, 2023 nix python

Technical documentation is tedious but important for every project. Hence, it should be easy to create, extend, and keep up to date. I tend to use the open-source tool MkDocs for projects. In this blog article, I share how to extend and package this tool with nice plugins that make documentation easier.

Read more

Constructing Parameterized Matrices with GNU Octave

February 6, 2023 c++ nix

This week I was dealing with image processing and linear algebra, and I needed a quick derivation of a specific kind of matrix. With GNU Octave to the rescue, this cost me only a few minutes! This article represents my notes from this little journey from the mathematical derivation of the matrix and the symbolic solution that I then ported to C++.

Read more

Mixed C++ Monorepo Project Structure Development and Build Workflow

January 23, 2023 c++ nix

Most big C++ projects lack a clear structure: They consist of multiple modules, but it is not as easy to create individually buildable, portable, testable, and reusable libraries from them, as it is with projects written in Rust, Go, Haskell, etc. In this article, I propose a C++ project structure using CMake that makes it easy to have incremental monorepo builds and a nice modular structure at the same time.

Read more

(Qt)Quick C++ Project Setup with Nix

January 16, 2023 nix c++

I never install toolchains globally on my systems. Instead, every project comes with its own nix file that describes the complete development toolchain versions and dependencies. This way, fresh checkouts always build the same way on every machine. This week I would like to show you how I set up a C++ project with the Qt Quick framework, and how to package the app and make it runnable for other nix users.

Read more

Automatic Testing of Display Resolution and Frame Drop Detection

January 9, 2023 nix python testing

This week, I like to share a project with you that started as a very interesting challenge and developed into an interdisciplinary, productive, and fun experience: A fully automatic multi-display end-to-end customer test prototype. In the end, it was surprising to see what parts of the code the most effort went into.

Read more

NixOS Community Oceansprint late 2022 Report

November 26, 2022 nix

This is my trip report from the late 2022 Oceansprint hackathon on Lanzarote. For more information please also have a look on the website: https://oceansprint.org

Read more

NixOS Community Oceansprint 2021 Report

December 12, 2021 nix

This is my trip report from the awesome NixOS community hackathon on Lanzarote. For more information please also have a look on the website: https://oceansprint.org

Read more

Setting up a C++ project environment with nix

April 17, 2019 nix c++

This article explains how to quickly set up a C++ project environment with complete toolchain- and dependency management with nix. nix is a powerful package manager for Linux and other Unix systems (It is indeed a more powerful alternative to conan and docker) that makes package management reliable and reproducible. After setting up the project and playing around with it, we will parametrize the project description in order to automatically build it with different compilers and dependency library versions (GCC 7 & 8, Clang 7 & 8, lib boost 1.6.6 - 1.6.9, lib poco 1.9.0 & 1.9.1).

Read more

Managing libraries with Nix

February 27, 2018 c++ nix

While learning Haskell and using its really smart library dependency management tools (cabal and stack), i realized that the C++ eco system has a problem: There are no handy established tools that let the developer declare which libraries (and versions) are required for a project which can then be automatically installed in a portable way. Nix however convinced me to be more versatile and powerful than Conan and handier than Docker, Vagrant, etc. (although it’s fair to say that i am mixing use cases here a little bit!) In this article, i am going to showcase this great tool a little bit.

Read more

Newer Older