On Packaging Python Application with Nix

Background It is usually quite easy to package python modules with Nix. Most of the time, all you need to do is list the dependencies. Still, I have run across challenges that take a long time to solve on a few instances, and I would like to take this opportunity to document and share the solutions. I hope this information i useful to anyone that package Python libraries or applications.

Nix Flakes by Example, Part 1

If you are a Nix user, you probably already have heard about Nix Flakes. There are already many great posts about it, among them we have the author of flakes - Eelco Dolstra’s Nix Flakes, Part 1: An Introduction And Tutorial Nix Flakes, Part 2: Evaluation Caching Nix Flakes, Part 3: Managing NixOS Systems I plan to start a new series talking about the more practical side of flakes, i.e. how to use it to solve my day-to-day pain point, one example per post.

Web Development Environment on Specified Version of NodeJS, with Nix

The Goal Web development was fun but setting up the environment can sometimes be tedious because you might need multiple versions of NodeJS installed (hint: not all npm packages are compatible with all versions of NodeJS). Many developers uses nvm to manage their NodeJS versions, and it works great. However, since we are NixOS fans and Nix itself is a great package management tool, we would like to use it to manage our web development environment as well.

Declarative Docker Container Service in NixOS

Important Update 2020.05.24 After upgrading to 20.03 version of NixOS, the docker container starts to use the container’s actual name instead of its systemd service’s name to address the container. This means that to specify the database container from the filerun web server’s container, you need to change the value of FR_DB_HOST from docker-filerun-mariadb.service to filerun-mariadb. The Problem One of the biggest convenience you have in NixOS is that many of the services you want to run are already coded as a “service”.

Packaging (Nightly) Rust Application with Nix

Introduction Rust has gained a lot of traction recently. I was chatting with a friend about building web applications with rust, and mentioned how rocket makes it easier and enjoyable. I figured it might be a good time to pick rust up now. It does not take long to refamiliarize myself with rust and rocket, and I ended up building a tiny and dumb web application with it. My plan was to further polish it and make it a NixOS service, so that I can easily spin it up on all my NixOS powered machines.