Skip to content
zimbatm.com
Share
Explore

icon picker
zimbatm

Hello! Welcome to my personal website.

As part of my software engineering practice, I tend to take notes. Sometimes when the content seems to be useful for others, it gets thrown onto this website. It's not particularly curated, but hopefully, you'll find something of interest in this mess.

If you enjoy my work, you might also be interested in hiring .

Notes

View of Notes
1
The NixOS “settings” option: when and how to use it
Two years ago, , a new settings option to NixOS modules. Previously, to define extra settings on top of the default ones, you would use the extraConfig parameter. But it was inconvenient to use it, and sometimes the option exposed faulty behavior. This is all gone with settings, which can specify configuration files as a structural Nix value.
NixOS modules that ship with nixpkgs has been slowly adopting it and now we have some experience of how it plays out in practice.
Here I will discuss the pros and cons of settings and its usage: when it's appropriate to use it and when to avoid it. I'll also give you some recommendations.
Nix
1/20/2023
1/23/2023
the nix configuration
There are some surprising corner cases with how Nix handles its configuration. My goal with this article is to clarify your mental model. I will take a few shortcuts to keep this focused on the high-level mechanisms.

Baseline

The first thing to establish is Nix has a client (nix CLI) / server (nix-daemon) architecture.
Nix
Tutorial
8/18/2022
8/18/2022
Enrolling existing AWS Account in ControlTower - AWSControlTowerExecution IAM role
Hopefully, this page gets indexed on Google for the next person.
This is for people enabling AWS Control Tower on an existing AWS Organization.
AWS provides documentation on . They mention that the old AWS accounts need an AWSControlTowerExecution role. And then never tells you how to create one.
Engineering notes
8/10/2022
8/10/2022
Nix packaging, the heretic way
One difficulty when using Nix is that it’s possible to hit a purity wall. A dependency is not in nixpkgs (yet), and you have to package it yourself. But the project does some impure things during the build. It’s using some esoteric language that doesn’t have a <lang>2nix tool yet.
And sometimes it’s hard to go to your customer/boss and tell them you have to spend the next 3 weeks doing “things right”(tm).

Nix
7/5/2022
7/5/2022
Announcing nixpkgs-unfree
Recently I was saying that we should avoid creating too many instances of nixpkgs. Either accept an argument or use the flake follows feature:
There is just one problem with this claim; what if you need to access unfree packages? For example, try running:
Project
2/4/2022
2/4/2022
Website setup: Notion, Super and CloudFlare
Somebody asked me how this website was set up. So here it is 🙂
Before we jump in, here is a table of all the costs associated with this configuration.

Costs

Writing
1/29/2022
1/30/2022
1000 instances of nixpkgs
This is a bit of a PSA for the NixOS community (and me), to try and expose something that I see:

dependencies should not create their own instance of nixpkgs
Nix
1/26/2022
12/22/2022
Nix 2.6 eval improvement
With the recent , I was curious about how much impact all of @pennae’s work was having on the Nix evaluation.
TL;DR: Nix evaluation is 11-17% faster in Nix 2.6 compared to Nix 2.5.1

Methodology

Nix
1/25/2022
1/26/2022
2022, the year of writing
A real developer should write their content in a markup language, commit and push it with Git, and then use a Static Site Generator. That's how a developer is supposed to handle their personal website, and that's how you know they are good... Right? For the longest time, I have been stuck mentally with this idea.
The problem is that writing is a messy process. Especially when my ideas are unclear, and it takes many small iterations before I get to a point where I am satisfied with the result. And I do not even claim that my writing style is good.
The point is that Git creates too much friction. I do not care about writing commit messages. It's awkward enough to share my ideas with the world. And now I have to worry about sharing my inner workings on top?
Writing
1/5/2022
1/5/2022
Terraform patterns: usages of count
count (int) - The number of identical resources to create. This doesn’t apply to all resources. For details on using variables in conjunction with count, see Using Variables with count below.
TL;DR: only use the count attribute to enable resources.

Basic example

Terraform
1/2/2022
1/5/2022
Summary of Nix Flakes vs original Nix

Quick recap

Flakes was born when Shea Levy, who worked at Target at the time, decided to hire Eelco (who works at Tweag) to solve a set of issues that Target was having.
Flakes is a set of extensions for the Nix language that is currently (Dec 2021) behind an experimental flag.
Nix
12/27/2021
1/5/2022
Ocean Sprint 2021 Report
After almost two years of being cooped up at home, the main thing I ended up doing was talking to people. It was nice to catch up and exchange ideas without the friction of computers in between. I didn’t get a lot done this week but I think that syncing up brains will be useful down the line.
With Bernardo, we spent a bit of time looking at voting systems. We were talking about how to improve governance and leadership, and ended up looking at other communities like Debian, Python, Kubernetes, ... In particular, we were interested in their voting systems as a way to make the system more democratic. If the RFCs could be voted on when they are “ready”, it would change the nature of the shepherds to be mostly helping build the best possible RFC.
The rest of my time was spent benchmarking nix and nixpkgs. I think that our community is relying on nixpkgs overlays too much, and I needed those benchmarks to make one of my points. It resulted in a series of articles that I have started writing and will be publishing soon on /. Of course, as with each new article, I will first have to re-do the website entirely with a new static site generator 😊
Nix
12/17/2021
1/5/2022
Bisect Debugging

I was using git-bisect a lot and asked myself if this approach was generally applicable. It turns out that it works surprisingly well in a lot of cases. And I keep getting reminded that it works through practice. That’s why I’m writing this article.
But first, here are two triggers that show that I don’t know what I’m doing:
Software Engineer
10/21/2021
1/5/2022
Maintaining Open Source
This topic is recurring on HN. Some maintainer gets burned out and declares that Open Source is toxic. Ensues discussions.
Here are some thoughts on this subject, mostly to clarify my own ideas.

On maintaining direnv

Software Engineer
11/15/2020
1/5/2022
The Git staging area
I see a lot of users out there that don’t understand the Git staging area.
Conceptually this is the biggest change between traditional Source Control Management (SCM) tools and Git. Tutorials should explain that first:
Traditional SCM: code changes -> commit Git: code changes -> staging area -> commit
Software Engineer
10/13/2020
1/5/2022
Deploying to AWS with Terraform and Nix


Let's say that you want to deploy this NixOS configuration onto AWS:
Nix
Terraform
5/23/2020
1/5/2022
Meetup NixOS Suisse Romande - Exercise
Pour cet episode nous allons faire un petit exercise pour apprendre a utiliser NixOS.

Preparation

French
Meetup
Nix
5/20/2020
1/5/2022
Nix Flakes
NOTE: All of this is completely unstable so please don’t adopt this just yet
Nix Flakes is an experimental branch of the Nix project that adds:
A central flake.nix entry-point to Nix projects.
Nix
5/9/2020
4/26/2022
Engineering notes
A good software engineer should always take notes on the task that they are doing.

Before starting any task, open a notebook.
Software Engineer
2/15/2020
1/5/2022
The Software Engineer

Software Engineering as a discipline

A software engineer is a software developer that embraces the task like a discipline. And as any discipline, like martial art, the various aspects get decomposed and trained individually.
As I didn’t find much literature, because I didn’t search to be honest, on the practice. This is my attempt at doing just that. Look at all the things that I have learned in isolation and try to describe them the best that I can.
Software Engineer
7/9/2019
2/16/2022
Writing
I don’t know much about writing. These are mostly notes for myself as I try to improve my writing practices.

Why writing

Writing is the best way to communicate ideas. It allows thoughts to be presented in their purest form, without all the noise that comes from sensory feedback.
Software Engineer
2/17/2019
1/5/2022
CLA

On Contributor License Agreement (CLA)

CLA exist for the benefit of corporations. They want to profit from our free labour, but not take legal risks of potential copyright misattributions. Of course, this means that this shifts the burden to the contributor. I am sorry but I am not going to sign a legal document, with all the risks attached with it, or pay a lawyer, on top of providing free contribution.
If you want my contributions, this should be enough:
Opinion
2/17/2019
1/5/2022
Sleep
We need 7-9 hours a night
Getting enough sleep is the biggest hack for your body and mind. It will improve your performance by 30% overall.
Turn off most of the lights in your house at night 2-3 hours before bed.
Life
8/7/2018
1/5/2022

Projects

View of Projects
1
devshell
12/31/2021
nix-shell on steroid
This link can't be embedded.
Alpha
nar-serve
12/31/2021
Serve content straight from your Nix cache
Beta
nixpkgs-unfree
2/4/2022
nixpkgs with the unfree bits
Beta
Numtide
12/31/2021
Consulting Network
Beta
treefmt
12/31/2021
one CLI for all the code formatters
This link can't be embedded.
Beta
clean-git-action
1/1/2022
Leave no build artifacts behind
Stable
direnv
12/31/2021
per directory environment variables
Stable
docker-nixpkgs
12/31/2021
docker images straight out of nixpkgs
Stable
flake-utils
12/31/2021
Pure Nix flake utility functions
Stable
github-deploy
12/31/2021
Track deployments on GitHub PRs
Stable
h
12/31/2021
faster shell navigation of projects
Stable
mdsh
12/31/2021
markdown shell pre-processor
Stable
nix-filter
12/31/2021
a small self-container source filtering lib
Stable
nixpkgs-fmt
12/31/2021
a nix code formatter
This link can't be embedded.
Stable
serve-go
12/31/2021
Like vercel/serve but for production. Serve SPA apps quickly.
Stable
shab
12/31/2021
full template engine in 4 lines of bash
Stable
socketmaster
12/31/2021
zero downtime services restarts
Stable
terraform-provider-linuxbox
12/31/2021
Configure Linux machines with Terraform
Stable
terraform-provider-secret
12/31/2021
Terraform provider that holds secrets in its state
Stable

Old projects

View of Old projects
1
Name
Notes
Header Image
Created
Description
Homepage
Status
Tags
1
BuiltWithNix
12/31/2021
landing page for Nix
Stable
2
logmail
12/31/2021
sendmail to syslog
Stable
3
nixbox
12/31/2021
Vagrant NixOS boxes
Done
4
NixCon 2018
12/31/2021
Done
5
NixCon 2019
12/31/2021
Done
6
NixFriday
12/31/2021
A weekly stream about Nix
Done
7
terraform-nixos
12/31/2021
Deploy NixOS machines with Terraform
Done
There are no rows in this table



All content on this website is copyright zimbatm and licensed under the .

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.