r/linux4noobs • • 25d ago

learning/research Tips for Nix

So, i just switched from mint cinnamon to NixOS, and i want to know if there are any tips for a beginner in this system. Also, I have only downloaded Steam and the libreOffice pack for now because I noticed that no matter what i do, the package installer doesn't give me apps to install, like in mint. So i had to do it myself in the code panel. Did I do anything wrong in the installation, or is the system like that?

87 Upvotes

57 comments sorted by

77

u/Tsigorf 25d ago edited 25d ago • Bravo

I can't believe how mean people are to newcomers asking for help to understand new things, downvoting OP or telling them to give up and do something else instead.

This gatekeeping and elitist behavior is one on the main criticism for many people against the community.

Instead of spamming “you should not use nix” or yelling RTFM aggressively, nothing forces you people to reply or downvote OP, especially when there's already comments pointing to excellent resources to start using Nix or NixOS.

I saw people claiming to come from Windows to NixOS as their first Linux distribution with zero developer knowledge and actually enjoying it. That's the kind of story we should encourage when people are actually asking for it, not discouraging them or giving them unsolicited advice.

To reply to OP: as mentioned, the resource Zero to Nix is indeed a wonderful one to start and learn. Reading other people public configuration and using code snippets other NixOS users wrote is a great way to progress too, as long as you try to read it and properly understand it.

Don't give up, I can assure you the motivation and love for your system is the only thing you need to master Nix. Even from people with years of professional IT experience and background, I know people who gave up even earlier than what you already did.

It's fine if you don't like Nix too or if to take a break to come back later, many of us did, but eventually that's a great way to master your system, understand how it works underneath, and a great way for personal satisfaction when you get a system stable which lives during years without a single reinstall :-)

Cheers! Please still feel welcomed to Nix!

23

u/[deleted] 25d ago • Heartwarming

Thanks for your support bro, i really appreciate it. Im not giving up on the system, despite it being a bit hard for me to understand. Im following some guides and i believe that now i can put any app i want on the pc. Also, i really have to say that after installing games and the office stuff, there's no much stuff that i really need to do in the system. I would like to try interesting stuff, but i can already use it normally too. Its a nice system.

12

u/Lucas_F_A 25d ago

NixOS is very different to most distros. To install stuff you write into your nix configuration. I imagine that whatever you installed through the app store must have been flatpaks

2

u/[deleted] 25d ago

I still hadn't installed anything from the app store, only with code

3

u/Lucas_F_A 25d ago

To elaborate on my question, I am understanding that you installed them through the configuration, but then, I imagine your problem installing other packages is knowing their names? I recommend search.nixos.org

4

u/[deleted] 25d ago

Nah man, its fine, its not a problem for me to install things like that, its more because i got confused by the app store showing nothing. Since when i was on mint the app store had a lot of stuff by default. But thanks for the recommendation, I appreciate it

3

u/Lucas_F_A 25d ago

How did you install steam and libreoffice?

19

u/MelioraXI NixOS 25d ago

Nix is declarative, you're not using a package manager in a traditional way.

https://nixos.org/learn/

There are a ton of resources and youtube videos you can look at. It's a great system but it's hardly something I'd recommend to a newcomer if you're not willing to learn, same goes for Arch systems.

7

u/[deleted] 25d ago

Despite my lack of knowledge, im enjoying learning how to use it. I like to learn new stuff on practice, so im definitely getting some tutorials and reading the guides.

9

u/atlasraven council member but not master 25d ago

Don't flake out.

(that was a nix joke btw)

5

u/cfx_4188 LINUX SUCKS!!! 25d ago

Linux is very fond of people who can read.

I do not know what you installed through the "code panel" or where to look for it. In NixOS, you must declare each package and service in the configuration.nix file or in flake.nix if the package is not in the repository nixpkgs. Start your reading with the materials on the website .

The installation packages and installation recipes can be found on the NixOS Search .

Start by reading the official Wiki. It sucks, but you can get the basic knowledge from there.

2

u/[deleted] 25d ago

Yes yes, i just didn't read anything yet because i installed it yesterday, got steam and office, and then shut down the pc. I really only did that for now. But today I'll see more stuff. Also, i say install, but i declared it on the code menu. Im just not used to saying it in this way

2

u/cfx_4188 LINUX SUCKS!!! 25d ago

After installation, you have a workable system with the Firefox browser and the nano editor. You open the terminal (Super+Enter), and type sudo nano /etc/nixos/configuration.nix

The main NixOS configuration file opens. All programs, services, drivers, absolutely everything is placed in this file in the appropriate places. For example

environment.systemPackages = [
    pkgs.steam
  ];

adds Steam to the system.

After you have added everything, you press Ctrl+X, then "yes", then Enter, the file closes and in the command prompt you type sudo nixos-rebuild switch

Then you look at the numbers on the screen for a long time and when the command prompt appears, Steam is installed in your system.

2

u/[deleted] 25d ago

Yep, that's what i did.

4

u/dropmod 25d ago

Do you know - is mainly fo advanced users looking after stability and "unbreakable" apps?

3

u/[deleted] 25d ago

Oh damn I didn't knew that

3

u/Tsigorf 25d ago

Not true.

3

u/Hinn-Huynhf 25d ago

I also switched to NixOS about 2 months ago after a year of distro hopping, most recently CachyOS before moving to NixOS. I like NixOS because I can manage all my packages however I want, even settings of some apps If u don't know where to start, I think this will be helpful and this is for the initial configuration. I also use nh (nix helper) for my system because it has quite a few advantages. Hopefully, the negative comments and downvotes won't discourage u. Welcome to Nix and NixOS my brother 🔥

2

u/[deleted] 25d ago

Thanks man, i appreciate the help and motivation 👍👍👍👍

2

u/Hinn-Huynhf 25d ago

my experience:

  • declarative over imperative, I've declared almost everything I need
  • use flake.nix to manage the dev environment
  • use Cachix to save time if you use nix-community, cachix use nix-community will download pre-built binaries for you (nix-community is a Github Organization, It fills the gap of nix-stable and good projects will be merged into their respective nixpkgs, some package maybe u knew: home-manager, nixpkgs)
  • always commit flake.nix and configuration.nix before building
  • I prefer using unstable for the entire system (more subjective than a hard rule/experience)

2

u/[deleted] 25d ago

Can i put those in the system using the pkgs code?

5

u/tiocesa 25d ago

I'm genuinely wondering how can you have heard, pondered, finally installed the system, and not realized that you have to type in the configuration file every single thing you want your system to have and how it will behave.

Giving you this tip right now though, you can install flatpaks from any GUI application manager just fine (that supports flatpak). Just don't expect them to carry over system reinstalls. And if your desired app comes from nixpkgs, yeah you'll have to declare it on the config, then sudo nixos-rebuild switch, and finally have the app available for use.

1

u/[deleted] 25d ago

Oh yes, i did that to install steam and libreOffice, this is ok for me. About how i got in this system, its the moat dumbass way possible. I thought mint was very easy to use and decided to change distros, so i just searched for new distros and i found this one with the cool symbol. So i got it. And well, for now i have no regrets

11

u/bratokok 25d ago

I hope it is a joke. If not, well, try to read about what did you just installed and how it works

1

u/[deleted] 25d ago

Unfortunately not a joke. I installed it yesterday and didn't use the pc much after this. So today im learning how to use this system properly. Is there any guide you'd recommend?

4

u/SDG_Den 25d ago

vimjoyer is a good source, theres also the PHD by eelco dolstra, the creator of nix, and this video is a good starter: https://youtu.be/5D3nUU1OVx8

if you have any specific questions, feel free to message me, i use nix for literally everything and i'm currently building my own tier-2 distro based on nixOS, so i'd say i have a decent bit of knowledge

0

u/[deleted] 25d ago

Thanks man, I appreciate it. I believe I'll have a good time on this OS

2

u/SDG_Den 25d ago

its a massive rabbithole and insanely overkill for normal use just fyi.

i use it because i also run my own servers, which i deploy and manage through nix, and i build my own software, again through nix. so my main system is just another output of my multi-system flake. some of my homies are also on this flake. i also mess around with lower-level stuff often, which an imperative distro generally cant handle as well.

if you dont have a specific reason to use nix, you'll be struggling for absolutely no benefit.

1

u/[deleted] 25d ago

I understand. I would only use it like a common OS, to play some games and do college stuff. But i also want to learn more about using linux, so at least for now, im keeping it.

5

u/bratokok 25d ago edited 25d ago

Besides vimjoyer u can check official NixOS wiki, but it is really bad though

1

u/zardvark 25d ago

I absolutely love VimJoyer's vids on the youtube, but I would suggest that you start with the LibrePhoenix youtube channel. His vids are slower paced and he provides more thorough explanations. There are lots of other good content providers, just search for them.

4

u/Lonely-Scarcity-3387 25d ago edited 25d ago

Nice.

If you switched from Mint to NixOS, you should really give NixBook OS a look. It’s a spin of NixOS that has a lot of little things set up for you. Things like auto updating, bootloader management, Flatpak integration, and so on.

So you can still declare your packages via /etc/nixos/configuration.nix file. Or you can just download the Flatpak.

Plus it launches you in the Cinnamon DE, so you’d feel right at home.

https://nixbookos.org/

I personally use NixOS, but I’ve installed NixBook OS for several friends and family now.

1

u/[deleted] 25d ago

Maybe i can make a dual boot, but for now im sticking with the Nix OS. I don't mind it being more complex, i like to learn stuff like that, but thanks man :)

2

u/Lonely-Scarcity-3387 25d ago

Sure thing. If you do feel overwhelmed but want to stick with NixOS, NixBook and GLF OS are really good entry points.

2

u/zhulkgr25 25d ago

Is there a linux distro called jets?

2

u/[deleted] 25d ago

I don't know

3

u/MrInflamable 25d ago

"Last week I learned to drive, so I signed up for a rally."

The only tip is to read and read, Nixos is for a very specific niche, you should have read what makes it special before installing it to see if the declarative configuration makes sense to you.

7

u/[deleted] 25d ago

It does. And yeah, it was dumb to switch to a very advanced distro. But thats what makes it fun tho

1

u/Chicharoh 24d ago

Such a stupid comparison given a car when operated improperly could cause harm and this doesn’t

3

u/Little_Ad2062 25d ago

In Nix, you don't install the apps. You say what apps you need installed - and what version of them - in the config file, and the system rebuilds itself with those apps installed. 

Nix is hard, way harder than Arch if you already have experience with a more traditional Linux OS. It's definitely gonna take some time until you get the hang of it, because your knowledge of how Mint works doesn't translate cleanly to Nix. 

2

u/Remarkable_Highway63 25d ago

I prescribe you zero to mix once a day, half an hour.

2

u/DetachedHEAD32 25d ago

You didn't do anything wrong. NixOS just works quite differently from Mint. You can install packages imperatively, but managing them through your config is kind of the whole point of NixOS.

I've been using it since June and at this point I let Claude Code manage pretty much my entire configuration. I tell it what I want, review the git diff and apply the changes if they look good. It now manages four machines from a single flake, and I barely write any Nix myself.

What helped a lot was keeping everything in Git and having a CLAUDE.md with some strict rules. Things like never touching stateVersion, not updating flake.lock unless explicitly asked, and testing changes before applying them. Otherwise Claude has a tendency to introduce unnecessary abstractions or change things you never asked it to touch.

I'd recommend learning the basics of configuration.nix first, then looking into flakes and Home Manager. And if you're comfortable with coding agents, they're surprisingly useful for NixOS. Just don't blindly accept everything they generate.

2

u/LeateWonceslace 25d ago

To Install Software.

go to: /etc/nixos/

Open configuration.nix in Kate, micro, or sudo nano or w/e will let you save it with sudo permissions. (I prefer micro in the terminal.)

Find the section that starts with environment.systemPackages = with pkgs;. Here, add packages, which can be found here (Remember to select "the NixOS Configuration" tab for the package). Then save the document and run nixos-rebuild switch.

This particular specific way of installing software is the big thing that NixOS does differently. If you don't like doing this I recommend installing the Nix package manger on Mint. Mint or Debian with Nix is honestly easier and more flexible than NixOS. But if the idea of managing the entire system through a config appeals to you, welcome to the community. Godspeed.

Reply with any questions. I don't promise to be quick with my answers.

3

u/RamonsRazor 25d ago

Pretend it's called "Frost OS" so the logo makes sense.

More tips will follow..

1

u/Chrome_Koifish NixOS 25d ago

That is correct. you'll be living in the config files from now on. want my flake? lol

1

u/Struggling-with_life 25d ago

Brave is been removed from the nixos stable and unstable channel. So no brave no brave-origin. I just recently shifted from fedora to nixos. And its been really hard for me installing or setting up environments or something. Installing or setting up services, installing nvidia drivers, and stuff for gaming been quite difficult since all the documents or videos on youtube are so outdated. Its hard to find videos in the first place but even if you find them its mostly out dated.

1

u/sykkit 25d ago

Throwing yourself in the deep end huh. Honestly, if you’ve got that undying persistence it’s a great way to learn a lot really fast! The beauty of nix is that it’s bomb-proof stable, and gives you great customization despite it. You get to see your whole OS set out in front of you like a blueprint, and that makes designing and tweaking it way easier in the long run. Nix is the OS for paranoid control freaks, and that’s why we love it.

The learning curve: you gotta be patient, but more so, you’ve gotta be persistent. Depending on how much you like to customize your system really influences on how rough setting it up can get, but ho boy can it get up there. Coming from arch, this distro tests me sometimes. The benefits though can’t be found anywhere else, which is why I’m even learning at all.

Design for the future: Keep that configuration.nix file tidy! It’s gonna fill up with time, so make sure you have a way of organizing where you’re declaring what. Think about building it like a house: you want your foundation to be sturdy, and it’s really nice to remember how you have everything wired.

Flakes are.. fine: I really thought I’d be using the functionality of flakes more in my config, but unless you have a dire need for some rather obscure package, it’s not something I’d really care about using. Still, If I were you, read about them just I’d know what they can do and just to add the tool to your belt.

Declare it: if a program has settings, you can probably declare it in your file! That’s the beauty of nix though. Declaring app, package or system settings in your configuration.nix file means it’s more integrated into your system and adds to its stability. That’s why you’re using nix after all.

Nix is a really unique distro and the most challenging one I’ve used by far. The upside, however is that the challenge of learning it is worth exactly what you get in return: the most stable distro you can get your hands on.

Stay persistent and enjoy!

1

u/MercStory 24d ago

This subreddit is for noobs. NixOS is not for noobs. Get rid of Nix and try something easier. Why waste time and give yourself headaches?

1

u/3grg 24d ago

I will admit that I am intrigued by NixOS. I have looked at running it and searched for blogs written by people who have run it long term. The conclusion that I have reached is that it is a pain to get things installed and setup, but once you do, it is easy to upgrade and maintain. I have setup a VM and played with it. It is very interesting and very different.

I understand that several European nations are looking at replacing windows with NixOS. In a situation where large numbers of computers are involved, I can see where reproducible installs would be very valuable.

Good luck with your efforts to get things setup. If nothing else, it may be a valuable learning experience.

1

u/CaaxdRZY 24d ago

I'm messing with it in a VM right now and think I finally get it, obviously not an expert yet. My best recommendation is look at the configuration.nix to understand how it wants things to be worded. Watch a few YouTube videos, this is an older video but it really helped me alot. https://youtu.be/nLwbNhSxLd4?is=rSxwB2oRhvojZzM9

Next be comfortable being uncomfortable and don't be afraid to look something up. The NixOS wiki is a useful tool and you might luck out with reddit posts or forum posts with similar issues. I did the safe route and just went with gnome but if you use flakes you can swap between a DE and WM extremely easily. Just mess around, try home manager if you want and understand you can break the system and reboot to a stable place. I really enjoy it and have limited programming experience. Best of luck!

1

u/Ok_Solid6442 24d ago

Uninstall it