Home All posts #nix# nixos# linux# tools# workflow

NixOS my favorite linux distro

Hi there, I'd like to talk about my experience using nixos in this post.

Well Nixos is a particular linux distribution because it has a different configuration way and its package system is totally different from any other distribution so it makes nixos a special place for daily usage.

I've been using nixos for 3 years and it has been a great experience, I've always been a linux enthusiast, I was using arch when I tried nixos because a friend recommended it to me, but I knew that NixOS represents a challenge that requires time to study it, so I learned it at a vacations, well it was kinda frustrating, but it ain't shit; if you can't with nixos you have a huge skill issue (no offense, but you need to learn more about linux ecosystem), you're too lazy or you dont have free time, and it's understandable so nixos has a difficult learning curve, the system is completely different, everything must be written in nix language that is a declarative programming language (so powerful btw) and the feeling of read/study another stupid technology only to understand a linux distribution sounds stupid, but worth it.

First at all, nixos ain't a bad distribution and it is a huge project with a lot of work behind, it's widely used by big tech companies like Shopify, Mercury, Replit, Google, Monzo, Supabase, and others. Why? Cause the nix ecosystem is powerful and applicable to plenty of software projects and environments. Here I go to share the tools that I use.

Nix packages

The nix-pkgs is one of the best package systems in the world, it's the biggest package repository and Nixos makes a very good use of it, as well as, you can add packages (and use) easily, packaging your package inside a flake

Nix Tools

Nixos by default has a lot of features that converts the experience powerful.

Flakes

Flakes are the best thing ever made, it's a great way to declare environments/packages/instructions to use the nix ecosystem.

Nix shell

Nix-shell is one of the most used cuz this implements an isolated environment with the packages/configuration that u want without installs it in the system. You can have an isolated dev environment or try packages/software/programs. And its usage is so simple, you'll need a define a shell.nix or just use the command-line word (nix-shell, nix shell).

Nix develop

Nix develop is a cool way to have isolated dev environments to program in a comfortable way, it's run in nix-shell from a flake, it's useful to developing.

Nix containers

Nix containers is an excellent way to use native isolated containers using systemd-nspawn, without deps, without docker. Just declaring nix configuration together nixos system configuration.

And more...

NixOS has more tools and features natively but I won't enter on all of them.

Great tools by community

DIRENV

It's a shell's extension that executes things I guess, well I use this with flakes and works great

DEVENV

This is a dev environment 100% compatible with nix with features really good. I started recently to try it , so I don't know it too much, but it's great and I'm implementing this in my work flow.