Authors
Published on

Practical NixOS: the Book

Practical NixOS: the Book

NixOS Flake

I am in the making of a book about NixOS. The key thing I want for this book is to make it approachable by the wider audience. At best, the book would be easily understood by a person who had never had any experience with Linux whatsoever.

There is quite a lot written about nix and NixOS already in the form of documentation and blog posts, but there are actually no books - at all! I think the advantage of having a book is that you can keep up with the complexity being thrown at you in a linear fashion, instead of having to dive into countless rabbit holes without a known roadmap.

There are several topics which I have already drafted and they are going to make it into the book:

  • "Advanced basics" of the Nix expression language (there is still no good introduction out there, after all these years!)
  • What do cryptic vars like lib, config, etc mean at the top of a .nix file
  • Hitchhiker's guide to nix ecosystem
  • Overview of Nix architecture
  • Installing NixOS
  • Using Flakes
  • Channels vs Overlays vs Overrides
  • Binary Caches and Remote Builders
  • Nix Modules and writing your own
  • Having ecnrypted root volumes
  • Adding homemanager and using it for VSCode configuration
  • Using NixOS for development environments
  • Different development strategies: Rust, TypeScript & Node, Python, Go
    • Integrating tooling that you are used to without NixOS: livereload functionality, short compilation times, all the language's packages out there
    • Data Science and AI Research environments with Python
  • Community-developed tools and utilities for NixOS which would make your life simpler
  • Installing pre-compiled binaries as parts of NixOS configuration
  • One codebase as single source of truth configuration for different nix-enabled hosts
  • Rocking Wayland as daily driver
  • Containerizing apps the NixOS way
  • Nix-enabled Linux and MacOS with declarative management
  • Reducing build times and storage usage
  • Hardware drivers that simply just work, incl. CUDA and GPU Pass-through
  • Multiple monitor setup
  • Gaming, of course

This list is not complete, but it gives your the rough understand of what to expect.

Big chunks of the book are dedicated to the topics such as Nix Package Manager architecture and inner workings, and NixOS module system - probably the most mysterious concept among them all.

Below are my blog posts, which are serving as a draft chpaters for the book:

I would be updating this article and posting new pieces, so be sure to subscribe to the newsletter to be informed on the latest developments. Your feedback in any form (via comments, twitter or email) is extremely appreciated.

I will really appreciate, if you subscribe to my newsletter.
You inspire me to keep writing. Every reader counts.
You will receive email with link to confirm the subscription.