What are some good tips/tricks for nixos

New still

What are some tips and trick that you use that everyone should know about ? this week i found out about home-manager nix-index and some others.. nix run nix-env nix-shell so much stuff.. there got to be more that i’m not using..

Nix/Nixos seems so powerful that i haven’t even begining to scratch the surface!

P.S If i can understand the manual will that help me a lot and things should get easier?

2 Likes

nix-community/awesome-nix: :smiling_face_with_sunglasses: A curated list of the best resources in the Nix community

4 Likes

Welcome to Nix, OP! :raising_hands:

It is consensual that Nix/NixOS has a steep learning curve, and that is also a consequence of having many ways to do something, and also the various documentation sources. You have probably realized this as well.

What I would recommend is to always keep in mind that Nix is hard, and to build your own documentation of what works, what doesn’t, and your preferred way of doing things. In a sense, Nix is an engineering product, and so much be tackled with an engineer mindset as well.

I personally maintain a sort of personal wiki with logs of what I am doing, and since I work with Nix on a daily basis, I have built a respectable trove of problems I faced with their respective solutions. It helps a lot in not wasting time when I run across an issue that I solved a few weeks before.

Well the first step is finding the right manual, actually took me months in the beginning to figure out that the nixos and the nixpkgs manual are two different things. And there is the nix manual too.

ripgrep is really useful.

Put your configurations in a git repo. Even if you aren’t using flakes.

1 Like

I’m very happy with NH:

It shows a very nice diff between switches to new configurations.

Here’s the command for reference:

1 Like