Help me to choose NixOS!

Hey there!

Short story: I have just bought a new laptop and in the next days I’ll hopefully have time to configure it, and I can’t choose between EndeavourOS (which I’m currently using) and NixOS.

A bit longer story: so I currently use EndeavourOS and honestly love it. I have used Nix (the package manager) for a year or so in the past and I have one month or little more of experience with NixOS. So not very much. I loved the package manager and did not encounter so many big troubles with the distro.
So overall a really good experience.

Now, to be honest I want to choose NixOS for my new laptop. But…
I haven’t enough long-term experience with it and I often read some things about the limits of this distro.
For context, my main use of the laptop is audio-related work (mainly Reaper and some vst) or some video editing (Blender stuff) and I know all of this isn’t gonna be a problem on NixOS, but the thing is that in the next weeks I’ll start a Full Stack Web Developer course, and I’ll start to code everyday on my laptop. I know for sure that I’ll have to do php, javascript, python, django, and many other.
Now I often read how NixOS makes things really painful for this kind of task, particularly (but not only) working with python.

This is what I wanted to know from you people: I know that workarounds and hacks do exist in NixOS, so I know that it’s not impossible to do this kind of work on this distro…but, considering that I will be learning all of this, for the first time, I’m honestly worried that doing this on NixOS would kind of making all of this even more difficult for me, making me learn more slowly and frustratingly. But this is the only reason that is making me unsure about the distro choice, so I would like to know your opinion.

I won’t ask you how to achieve this or that, since I haven’t start the course yet and I probably wouldn’t fully understand the answers.
I’d just like to know some opinions.

Would starting this journey on NixOS make things considerably harder for me? Or it’s just matter to learn a different workflow? What are your thoughts?

Thank you if you read all of this.

When I made the leap to NixOS on my desktop, I did find that it was a mixed joy to be more or less forced to spend time dealing with NixOS-specific problems with half of the new bits of software I tried out.

I wish I had known about distrobox when I was first starting. That really changed things around for me. Using distrobox for software that I intend to use temporarily or that just has to work without a lot of fussing, and then migrating permanent things over to my native NixOS configuration, has been a really good workflow.

There are other it-should-just-work solutions—FHS envs, nix-alien—but just giving the software that expects Ubuntu an Ubuntu container to use has been the easiest thing out of all of them.

4 Likes

I recently started on NixOS a few weeks ago (I was previously on EndeavourOS too!), so I’m still quite a newbie. So far I definitely think that there is a large upfront cost with learning NixOS. You (typically) start building a full configuration from scratch, learn a full new language, and a new way to think about managing your system. You have to go searching the internet for solutions for a lot of unexpected problems. A lot of things will require a bit more tweaking than just adding a single line to your configuration, especially with programming and development. There are a lot of resources online, you may just have to go searching pretty hard for them. I haven’t done too much programming, but I have gotten a few build tools to get working and I’ve always been able to find a good guide for what I’m trying to achieve.

What really helped me was running NixOS inside a VM for a few days until I felt that I had a good enough system that I could transfer over. Once I transferred over, I had a few days of free time so I was able to devote a lot of time to my system. I’ve been really impressed with NixOS and have been enjoying it so far :slight_smile: Hope my experience helps you make a decision.

Hey, thank you for the answers!

@rhendric I’m sorry, but isn’t there nix-shell for this kind of purpose? I’m thinking about

software that I intend to use temporarily

Anyway I’m glad that it works for you, but honestly I’m not sure that distrobox would suite my needs…I mean, I’d like to use NixOS trying to fully embrace it’s workflow. I think I’d personally feel like I’m fighting my system if I had to use distrobox to make things fully compatible with it and I’d prefer actually using a “normal” distro directly.

@DarkKronicle I totally agree with you! As I said I already used NixOS for a month or so, and I loved it but it has totally ruined me :rofl: that’s because now I’m not totally happy anymore on any normal distro, since now that I tried NixOS is just weird for me to not being able to declaratively manage my system. I don’t know, it seems all dirty, fragile and complex.
On the other hand, I fear that I might have big troubles with NixOS when I’ll have to learn Python and many other languages from scratch, making all of this extra difficult for me, so I’d be more comfortable with a traditional distro that I know very well.

So yes, basically trying NixOS has ruined my Linux experience lol

1 Like

Oh, nix-shell is excellent for software that is already part of Nixpkgs! That’s effectively native, as far as I’m concerned.

If I’m on a call with someone, and they want me to test some software that they’ve made or that they’re struggling with, and that software is packaged for Linux but not for NixOS, I need to get it working within minutes. NixOS used to be a serious handicap in those situations, but distrobox is awesome for that. That’s what I meant by ‘temporarily’.

But overall it’s great to know that a ‘traditional’ distribution is never far away, if I need to use one for any reason, and unlike a VM or a dual-boot configuration it’ll be performant and easy to use in parallel with the rest of my desktop.

3 Likes

Now I got it. Makes sense and it’s actually a great idea! Thank you.
And as far as my concerns about development, do you have any thought?

trust me, you are not alone. Fellow archer here as well.

1 Like

Oh really? Nice to know I’m not alone :smile:
Did you abandoned NixOS completely or still in the loop of whole-Linux-experience-ruined-by-NixOS™ like me?

I’m a developer too! Different languages have very different levels of support in Nixpkgs, and even within a given language ecosystem, projects that rely on different build systems can be more or less easy to get off the ground.

It’s a challenge to be both learning a new language ecosystem and learning (or in some cases inventing) how the concepts in that ecosystem ought to map to the Nix ecosystem’s concepts. Python development isn’t so bad—with some experience it’s pretty easy to get a new Python project started the Nix way. JavaScript development, in my experience, is best done by ignoring Nix entirely until it’s time to package things up, and the Node.js ecosystem tools mostly work without needing much tweaking or substitution (though there is the odd NPM package that expects to be able to download and run a binary, and those are problems on unadapted NixOS). I have no recent experience with PHP.

If you’re new to development, and taking a class in which the course materials are going to give you step-by-step instructions for how to configure your environment the way that the class expects, I really would recommend using a distrobox instance for the duration of the class. It will free you up to focus on the things the class can teach you instead of wrestling with problems that nobody else in the class will have. The skills you learn will still be transferable when you want to learn how to package your web apps for NixOS, and you won’t have to learn two unfamiliar things at once.

As for why you would use NixOS with a distrobox container inside instead of just the traditional distribution… well, it sounds like you’ve already gotten a taste of what NixOS is good at. You really can get the best of both worlds that way, and the extra layer of indirection is pretty unnoticeable. Up to you if you want that!

2 Likes

It’s a challenge to be both learning a new language ecosystem and learning (or in some cases inventing) how the concepts in that ecosystem ought to map to the Nix ecosystem’s concepts.

wrestling with problems that nobody else in the class will have.

I see, that was exactly what was worrying me the most…apparently I was right :slight_smile:

using a distrobox instance for the duration of the class.

I totally see your point and you’re right, this it the most rational and logical solution.

But unfortunately I have this thing for native stuff…I like to use the system the way it has been conceived, so as I was saying I was trying to fully embrace the NixOS way (I mean, without going totally mad), and given that this is not a really good idea since it would make my class even more difficult, I think I’ll just use a traditional distro then, and maybe come back when I’ll be more familiar with development.

One challenge at a time :slight_smile:

The idea to use distrobox is perfectly fine, it just would feel hacky to me, having to do it on my daily driver instead of relying on the native stuff my system provides me. If that makes any sense…

Thank you very much for your help anyway, that’s very appreciated!

hi,

when you use NixOS for a task that isn’t nixified, it’s often a real huge pain.

If $company asks you to install a proprietary software, it may also be complicated to run.

3 Likes

I see, I’ll better going with a traditional distro then. Thank you.

Just try it… Make your own opinion, other people’s opinions are perhaps biased. NixOS is the best operating system I ever worked with, couldn’t think about using something else.

Can I ask you what’s your use case? What are you using it for?
I agree that for some things is the best, my problem is that learning something new while learning a complex ecosystem like this could easily become a huge and counterproductive mess.
That’s why I couldn’t decide between the two.

I use it on all my computers at home, including my raspberry pi router.

I love NixOS because it allows me to manage all my computers (OS as Code) from one single repository (GitHub - drupol/nixos-x260: Contains the configuration of every home computers don’t mind the naming, at the time I only had a Thinkpad X260, now it’s a different story!). All my computers are sharing the same configuration while being different architectures and brands.

Learning NixOS is like learning Linux 2.0. That means that even if you know Linux already, you’re going to have a couple of new things to learn… which is actually for your greater good!

Using NixOS means that you will never be able to break it. I use it since 3 years and I was never able to break it, and I tried!

In a bit more than 3 years, the only proprietary tool that I had to use which is not available on NixOS (but I’m working on it), is the Oracle Database. Fortunately for me there’s a nice official docker image that works well and does the job.

I’m using a Thinkpad X13 Gen2, with KDE Plasma 6 and everything works, actually, it works better than my previous distribution Gentoo!

Recently, I saw this article: https://thiscute.world/en/posts/my-experience-of-nixos/ it might be useful for you.

My advice: Go for it, you will never regret it.

1 Like

Yeah, I actually agree, and for the proprietary-binary-thing I’m still thinking about the solution suggested by @rhendric…actually distrobox, if not docker in some cases like you said, could solve all these kind of problems, it’s a great idea.

So basically there seems to be no real downsides. Well, I’ll keep thinking about it, these days I don’t have time anyway…next week I’ll decide.

Oh, and unfortunately I couldn’t open the website you linked. Too bad, thanks anyway

Funny, I had to disable my Pi-Hole to have access to it too. Anyway, here’s the link to the source of the page in markdown: https://github.com/ryan4yin/thiscute.world/blob/8596e7fe6e537538bbfea4c8ef9e6de54e1924ef/content/posts/2024/Q1/my-experience-of-nixos/index.en.md
I think this is a very good post, might be useful for you.

2 Likes

Yeah, now it works. Thank you very much!

1 Like

Thanks for the recommendation! The problem has been confirmed and I’m working on it: #2194 blocks many innocent personal websites · Issue #2360 · hagezi/dns-blocklists · GitHub

2 Likes