Is something I said on Bluesky last week. Here is a longer take on this: I know Garnix quite well. We have the pleasure to count them as one of Numtide's customers. Julian and I launched the Nix Swiss-French meetup together. And I have been using them on my home repository for the past 6 months. So that's the disclaimer and context. It's also why I know and understand Garnix quite well. Like I…
The Crowdstrike BSoD outage is a good example of something that happens all the time. The user decides to use the software, to get something done. The software decides to run an update instead. The user now has to fix, find workarounds or get used to the user interface in the new version. The same issue appears in Dockerfile and other developer environments. The developer wants to get something…
On March 14th, Docker Inc. informed us via email that they would no longer offer the Docker Hub Free Team plan. We had 30 days to pay $420 per year or else our organization would be deleted. However, moving registries without causing disruption takes a long time. There is always a long tail of users that depend on the current location, buried in 20 layers of scripts or recursive Dockerfiles.…
Two years ago, @infinisil introduced RFC 0042 , 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…
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. They read the same configuration format but look at different places and don’t…
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 how to enroll existing AWS accounts . They mention that the old AWS accounts need an AWSControlTowerExecution role. And then never tells you how to create one. So here is how: Log into the account that needs to be enrolled.…
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 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…
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: $ nix run nixpkgs#slack error: Package ‘slack-4.22.0’ in…
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 Domain : 74 cents per month for me. Notion : free, or $4 per month. Super : $12 per month. Cloudflare : free. How it works flowchart LR Browser/Client <--> CloudFlare <--> Super <--> Notion CloudFlare --> Worker --> CloudFlare Notion Notion…
💡 If you are coming here from the Determinate Systems article, you might come with the impression that this article is anti-flake. This isn’t the case. The purpose of this article is to talk about a specific issue that I see arriving down the road. 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…
With the recent Nix 2.6 release , 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 I have both the nix and nixpkgs repo side by side. nixpkgs is checked out at ac44b27bab615fd49bc94fe22124deae233b5c94 (latest master) nix is checked out at 2.6.0 Then run nix-build…
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,…
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 The count attribute can be used to instantiate multiple resources with a single resource declaration. Here we instanciate 10 EC2…
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. While adding a set of useful features, Flakes also gathered some controversy in the NixOS community. This article is…
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…
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: Randomly upgrade packages in the hope that it will fix a bug. Create…
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 I have been maintaining [Direnv] for 10+ years now and have been fortunate. There hasn’t been too many toxic users there. Maybe a shell extension is geeky enough so that mostly…
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 To understand Git, the important part is to form that mental model. The code changes don’t go to…
Let's say that you want to deploy this NixOS configuration onto AWS: configuration.nix { ... }: { # Put your NixOS configuration here. Eg: services.nginx.enable = true; } The first thing to do is to create another NixOS configuration that includes the amazon-image config and your main config. This is what ultimately is going to end-up on the VM: aws-deploy.nix { modulesPath, ... }: { imports = […
Pour cet episode nous allons faire un petit exercise pour apprendre a utiliser NixOS. Preparation Installez VirtualBox: https://www.virtualbox.org/wiki/Downloads Telechargez l'image VirtualBox de NixOS: https://channels.nixos.org/nixos-20.03/latest-nixos-x86_64-linux.ova Chargez l'image dans VirtualBox avec "Fichier" → "Importer l'Appliance" → "Importer" Une fois demarer, vous pouvez vous…