Donovan Glover

nix-config

I've spent a few years fine-tuning my ideal programming environment. Using modern technologies like NixOS and Nix Flakes, I created a fully reproducible and open source GNU/Linux system that anyone can build and expand upon.

The source code is available on GitHub.

Pepper looking earnestly at declaratively configured Git abbreviations for the fish shell, written in Nix. Background art: The market, In Bloom and Vertical cover book two screen by David Revoy − CC-BY 4.0.

The Problem

The longer you use a phone, laptop, tablet, or other computer, the more changes you make to it.

Over time, you forget the changes you made to your system.

This is especially problematic for people that heavily customize their devices, such as technology enthusiasts, systems administrators, and software engineers.

The Solution

What if you could guarantee the state of your computer, so that you always know how it's set up? More so, what if you could declaratively configure your computer, so that you have a bunch of text files that anyone can read to ensure that state?

Enter: Nix.

Nix is a purely functional package manager that enables anyone to create fully reproducible and declarative system configurations. For example, this is useful when you want all the engineers on a team to have the same programming environment.

Example of a declaratively configured programming environment for Rust with Neovim and NixOS. Background art: Video game jam by David Revoy − CC-BY 4.0.

Unlike other technologies like Ansible that configure systems imperatively, Nix makes it possible to guarantee the state of a system.

In other words, if you remove a declarative option configured in Nix, that aspect of the system gets removed the next time you rebuild. For programs that manage their own state, that too can be managed with temporary filesystems and impermanence.

Getting Started

If you haven't already, download NixOS. You can use my system configuration in a virtual machine by running the following command in an existing NixOS install:

nixos-rebuild build-vm --flake github:donovanglover/nix-config#nixos && ./result/bin/run-nixos-vm

The code base is designed to be easy to add and remove stuff, so you're free to use it as a starting point for your own system. Have fun!