Hi, I am giving a talk at a meetup next week on my experience of switching from macOS to NixOS as my daily driver. I’ve now used NixOS as my daily driver for just over a year and have thoughts of my own, but I wanted to put the question to the community to see if there were some additional ideas that would be nice to add to my talk.
So please feel free to comment with anything along the lines of:
Highlights of using NixOS as a daily driver
Related benefits of using and being familiar with NixOS (even for a server)
Anecdotes of how Nix/NixOS is awesome
Comments specific to switching from macOS
And also, I am open to hearing about annoying quirks of NixOS and things that a macOS user would miss. I had some of these for sure, but still am very happy using NixOS a year in
Although Nix can be difficult if what you’re trying to do is off the beaten path (I mean, if there’s not already some package for what you want, etc.), NixOS itself is not difficult to install and get running.
Nix has a nicer user experience on NixOS than on macOS. Partly since with macOS, you risk mixing nix and non-nix compilers/libraries in confusing ways. Mostly because more of the nix community is on NixOS. – However, I’d still recommend starting out with nix on macOS or Linux before trying NixOS cold turkey.
… annoying quirks …
I think the highest source of friction is when some tool wants to download a binary, but the binary won’t be able to find the shared libraries it was compiled for. (IIRC, I’d run into that with minikube, or various nodejs tools).
And (especially build-) scripts referring to binaries with absolute paths, in the shebang or elsewhere. It’s your code that’s broken, dammit, not my system There’s more out there than ubuntu 18.04, and you should be ashamed for still using it, not telling me off for using something exotic! I guess the issue I have is that I feel like nix is actually the correct way of doing computers, and it annoys the hell out of me that not everyone has seen the light yet.
Ranty evangelism aside, the ease of just trying out a binary is so very nice. No more searching for a ppa or AUR package and hoping it still builds, installing a ubuntu vendor ppa on Debian stable to get support and praying it doesn’t destroy everything; or hoping pip/cargo/npm don’t make my terminal unable to start.
Sure, some things are harder to install, but the things that do install are mostly risk-free, and I can choose the versions I need, not the ones that fit on my system.
It’s also nice to have the ability to easily hook into the packaging mechanisms of the distro directly. Arch’s PKGBUILD probably comes closest, but making proper downstream packages on almost all other distros is incredibly tedious, especially when you want to share them between computers.
And well, ultimately that my whole messy system state is in git, with commit messages, and comments in code that explain to me why I did what I did to get something to work 6 months ago.
Oh, regarding servers, nixos-rebuild build-vm is an incredible little feature that you miss out on with just nix, and it’s really useful when maintaining simple servers. I don’t think any other deployment tool comes close to that convenience.
I think this has to be said, especially when talking to people who are new to Nix.
Trying to daily-drive NixOS is probably the worst way of getting into Nix. It makes your knowledge of Nix and NixOS the limiting factor on everything you want to do with your primary computer, because it’s hard to avoid using it to ‘just get random task X done’.
It makes much more sense to start out with the package manager or to try and deploy some specific projects as NixOS boxes. That way you can pick how you engage with it and when you get stuck you can fall back to using more traditional tools for a given task. I switched to NixOS after months of regularly using the package manager and that was still a bit early for me.
(I’m more of a developer so I don’t know what administrators or users would say, though I think someone who’s strictly a non-dev user who has someone else manage their machine will probably have the easiest time with NixOS by far.)
I always say it’s like having the ultimate power of a source based like gentoo, but nix caching saves your from looking like this.
Big barrier to entry is learning nix functional language… especially for life long imperative (python/C/C++/bash) programmers… so you have to learn something … if your crowd is adverse to learning anything new, then your pretty dead in the water.
and as @grahamc said it’s ‘fearless tinkering’ , I can literally do anything to my system and either fix it it, or roll it back so i can fix it.
The number of desktop system that i’ve seen borked, through gfx driver updates , to be fair… this can be attributed to close source vendors rather than the over worked people at , Nix just keeps trucking, it’s literally INDESTRUCTIBLE
Because nix declares its input dependencies , i can find some random github repo , with a cool tool, and if it’s has a default.nix/flake.nix i can get it running in the time it take to download the cache (hydra/cachix) or build it from source. I pretty sure it’s going to run.
Nothing on earth lets you share developer environments as easily as nix.
I’d certainly recommend you trawl the nixos reddit for the worlds funniest meme’s (both pro fan boys/girls and highly critical anti nixer meme’s too to balance everything out! ) They also breakup slides with endless text…a picture paints a thousand words as they say.
It’s not that nix/OS doesn’t break, it does , but breakage gets detected quickly with a whole raft of tests and it usual gets fix quicker , by our tireless community of nix fixers.)
did someone say ‘nix fixem’.
please post your talk if you can/dare, and above all make it fun and interesting… or nix fixem will not be happy
Hello . Here is my little contribution to this topic.
I do ops for a living. I love configuration as code.
Before starting nix (around 2020) i think i had 2 laptops, a desktop and 2 dedicated servers.
My issue was managing them all without having to operate a puppet server on my own.
I had the chance to be introduced to nix / nixos thanks to a colleague at work as well as Will T videos in Youtube.
The stateless / reproducible / immutable and efficient rollback sold me on this ecosystem.
While the learning curve is very High, i think the reward is even bigger.
I do not regret a single time migrating all of my machines to nixos.
Now i can manage all of them in a single repository, share some bits of configuration between my machines and factorise my whole setup.
I can also pop a vm with my main configuration if am not sure of what i am going to do. Launch some infrastructure testing aswell.
I even started contributing to nixpkgs repository and i was able to patch some package, even my kernel.
I do not think i would have bothered to do all of this when i was using arch / ubuntu on my machines.
I think when you are switching from macOS, mentioning experience you have with homebrew would be really good. As homebrew is a project that has a high degree of overlap with what nix is doing, especially when it comes to the computer being the ‘daily driver’, I think that would be very helpful to the audience.
Sorry no such presentations. Also there are many ways how to present Nix. All depends on the crowd and the presenter. What matters to some might not be the some to others. I would suggest to look on YouTube for examples.
I’m currently a student, and using a flake to manage my laptop means that there will be NO unexpected software problems halfway through the semester. Last year I was on PopOS 20.04 and I had several of these from the regular updates.
My own take on switching to NixOS (from Gentoo) is that the kind of problem on NixOS (and their solution) is very different than an FHS compliant distro. While NixOS make it really easy to share configuration between computer, install/remove services/servers/packages, and having a stable environment, running unpackaged software/services/servers (like mycroft) are often hit or miss. Some are usually easy to run (like a precompiled java program), other are often harder (like mycroft or some pre-compiled software – althought steam-run help in a lot of case), where on another FHS distro, I would have more issue setting-up server, or handle a bunch of different installation method for softwares.
(Also, I don’t remember how I switched to NixOS, but I can at least tell that I switched to using it to daily drive as soon as I finished to read the manual – actually, like when I switched to Gentoo, Antergos and Ubuntu beforehand – althought NixOS is the only one I read the complete documentation. And ubuntu and antergos where rather simple on the package management side).