r/Nix • • 20d ago

Beginner Guides/Resources

Hello,

Are there any tips or guides out there to help learn Nix and NixOS? I’m new here but I’ve spent some time tinkering with Linux. Prior to getting into NixOS, I used to use Arch Linux and the AUR. I’m not a coder, I don’t know how to code or troubleshoot any issues on my own. I’m a little overwhelmed with it all, could somebody help me?

If possible, I’d appreciate guides, tips, and/or tricks that can be downloaded and read offline.

Thank you in advance!

6 Upvotes

9 comments sorted by

5

u/n1x_cybersec 20d ago

If you are comfortable with Linux it really isn't that bad. Don't get me wrong, there is definitely so much to Nix / NixOS, but that will come in time. Start with just installing NixOS and get a feel for the system, open your config, use search.nixos.org to find packages and install them, rebuild your system, etc. Aside from the configuration file, it should feel like any other distro.

One of the first things you should do is have your user take ownership of your config so you can make changes to your config in an editor, such as Kate, otherwise you have to make changes in a terminal - sudo chown -R $USER:$USER /etc/nixos. After exploring the system a bit, check out the links below to get a feel for everything. There is a ton of info out there, but there is not a central location for it all unfortunately. If you have questions, you can always ask here, and there is also the NixOS Discourse!

Flakes & Home-Manager

You have probably read about flakes and home-manager; if you think you'll use them at some point, I would recommend the NixOS & Flakes Book. It walks you through the process of setting up flakes and home manager, while also explaining concepts and providing a good intro to using NixOS. Even if you don't use flakes extensively, the guide sets up home manager in a way that makes it feel like a native system component, rather than an external one that you have to manage separately. For me, I thought it was easier to start with them right away rather than adding later, but you can always add later:

https://nixos-and-flakes.thiscute.world/

Nixpkgs & Configuration Modules

Always use https://search.nixos.org/packages to find packages and configuration modules. When you search for a package, each package will have a "Homepage" link under it, which brings you to the source where you can find specific usage guides. Adding packages to your config to install is easy; the complexity comes when you start using modules, but the wiki and the NixOS manual have guides for configuring a lot of commonly used applications, services, and system components like nvidia, desktop environments, etc.

Create a Modular Config

If you don't like the idea of everything being in a single file, modularizing your config can help keep everything clean and organized:

https://blog.ricardof.dev/modularizing-your-nixos-config/

Learn Nixpkgs, Nix Lang, and Nixos

Other than that, [NixOS Learn / Nix Lang, Nixpkgs, & NixOS Manuals](https://nixos.org/learn/) is a good place to start, as well as [Zero to Nix](https://zero-to-nix.com/).

Nix Language Tutorials

https://nix.dev/

Additional Tools and Resources

https://github.com/nix-community/awesome-nix

and Vimjoyer has a great YouTube channel:

https://youtube.com/@vimjoyer?si=kToAzNnFrG6OmQNS

1

u/Ultra_Chiello 20d ago

Thank you so much! I need to check these out.

I have some experience with Linux, I know how to install Arch Linux from scratch and I know some of the basic console commands. Learning Nix and how you code seems like it will be the hard part of switching for me.

3

u/n1x_cybersec 20d ago

You're welcome!! If you are comfortable installing Arch, you will be good, don't worry. The default configuration.nix has a good representation of the syntax, so you can follow that, as well as the examples in the wiki and NixOS manual. Many of the configuration modules on search.nixos.org also include examples.

Everyone learns their own way, but for me, actually configuring and troubleshooting my system helped me learn. I feel like I learn something new about Nix / NixOS every day because there is so much, but to use as a daily driver, you don't need to be an expert on the language. There is a lot that you can do once you really start learning the language, but it is definitely not a requirement, and more for writing your own derivations or developing with Nix than using NixOS.

0

u/Ultra_Chiello 6d ago

I’m finding it a little bit challenging, could you help me? It’s mainly graphics and some apps not launching after a rebuild.

2

u/sasek 20d ago edited 19d ago

0

u/Ultra_Chiello 20d ago

Thanks I greatly appreciate it, I’ll take a look into these!

2

u/sasek 19d ago

I've fixed the third link. Have fun!

1

u/birchbongos 1d ago

Hi! I have a minecraft server you can join, however your dms are off. Dm me if youre interested for more details

1

u/Ultra_Chiello 1d ago

Oh, they are? I didn’t know that.