Nixos-cli :: A unified NixOS tooling replacement for nixos-* utilities

Hello NixOS community! I’m here to present a project I’ve been working on for a while now.

Check it out here: water-sucks/nixos

There’s a lot of tooling related to NixOS that spread out between different scripts, both inside of nixpkgs and officially maintained or outside of it and maintained by the community, written in many different languages, and poorly documented. So I started this project, originally intending it as a 1-to-1 rewrite of the current state of tools into a compiled language. However, my goals have now expanded a little past that.

This is now a reimagined NixOS CLI tool to manage everything related to NixOS in a much more coherent way: generations, switching, installation, and more to come in the future given time, along with planned enhancements such as supporting remote installation and generation management, options (a la nixos-option ), and more. It even links to Nix itself!

I originally started this project during a really boring physics class I was taking last summer as a way to learn Zig, but I really started getting into it even after that, and this tool has grown in scope a lot as a result. I now have two (pretty ambitious, to be frank) goals:

  1. To create a much more coherent UX to NixOS tooling.
  2. To make this a standard tool in the NixOS ecosystem, replacing scripts like nixos-rebuild , nixos-enter , nixos-container , etc.

I’d love input on what commands people would like implemented, and what functionality should be supported, and how I can best support the NixOS community in this endeavour. I intend to support both flake and legacy configurations alike, and already do to a certain extent, though I am separating the two into separate executables that one can choose to install as to not cause confusion on what should be used.


Honestly probably the most important thing is how discoverable these commands are. And command discoverability is directly linked to the way its documentation is structured.