I literally just gave NixOS a go day before yesterday. The two things I noticed if you want to use NixOS as just a basic desktop setup was..
1. It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command. Let me explain with a lil more explanation:
a. Partition your disk with parted or cfdisk and mount it (mentioned in docs https://nixos.org/manual/nixos/stable/).
b. Generate configuration file which has the biggest myth around it. My god, this is dead simple and could install it in 5-10mins after doing it just ONCE (This obviously excludes time needed to reading up about NixOS to be familiar with it, but trust me it is not hard for a first time installer). You literally run the command "sudo nixos-generate-config" and it generates a config file in .nix format and YOU DONT HAVE TO START FROM SCRATCH AT ALL. And you don't need to know nix programming language. It has all the settings needed in the config file and all you have to do is uncomment the necessary stuff. The sound, grub, wifi etc.
c. Then run the command "nixos-install".
THAT IS IT. You can even mention the packages you need to install in config file. You have a functional OS for desktop which can take leverage Nix package manager. AND YES! This includes wifi, grub, sound and everything basic. They all are already in the nix config file you generated. Uncomment the necessary settings and boom!
2. The second point was supposed to be that it is a point release and thus have old packages and hence not a rolling release. This was based on the package search that firefox and some other packages are one version behind even on unstable repo 2 days ago. But just as I typed this, I double checked and Firefox 93 is in stable repo (21.05) and so are some of my other packages. I went back to Arch and was gonna ditch nixos due to this. So this is huge. I probably gonna install NixOS on my laptop now. DO correct me if I am wrong on this please. Because this is the only thing that is stopping me from using NixOS.
> It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command.
Step 2 is doing a lot of work here. It's pretty 'draw the rest of the fucking owl'.
Using NixOS as a personal desktop for doing development can take a lot of work. You can expect it to take more work than just making the same setup in Arch linux, or whatever.
My experience with Nix is that it's 95% wonderful, 5% very painful. -- Navigating the painful parts of Nix requires understanding what's going on with the Linux parts, with the Nix parts, and with the parts of whatever you're trying to do. (Whereas with other OSs, you can generally get by with copy-pasting from StackOverflow).
Especially given that Nix requires use of a pure functional language, and that there are few tools developers are willing to put effort in to learn, Nix really stands out as unfamiliar.
> My experience with Nix is that it's 95% wonderful, 5% very painful.
This is very true. Having used NixOS as my main OS for 5 or 6 years now, the encouraging thing is that the '95%', the 'happy path' is growing all the time. It'll never be 100%, but more and more people will find that Nix's 95% covers 100% of their own use cases. (This is especially true as Flatpak matures and gains popularity, making it more and more useful as an escape hatch for running oddball software that Nixpkgs contributors haven't had a chance to wrangle yet.)
> Step 2 is doing a lot of work here. It's pretty 'draw the rest of the fucking owl'.
Not really. Most distros aren't fully set up from the moment you complete a base install. Similarly, all you need for a base install of NixOS is to enable (1) a desktop environment, (2) a text editor, (3) a web browser, and (4) probably NetworkManager. In practice, this is a matter of uncommenting three or four lines from the template that nixos-generate-config gives you. Then after the install, you go about making everything comfy, just like with any other distro.
A few packages are effectively rolling even in the stable distribution, because they have a high volume of security fixes and it's a high-impact application. We just don't have the resources to backport all the fixes. This isn't completely unlike debian's treatment of e.g. firefox which keeps even its `oldstable` distribution up to date with "latest" ESR (correct me if I'm wrong).
There are still debates in the community over what the stable distribution is "for", so you may occasionally see some inconsistencies in what gets bumped and what doesn't.
For a daily driver, I'd just use nixos-unstable instead of a specific release to get access to all the up to date packages. It's actually not as unstable as the name might imply. PRs are merged into the master branch of nixpkgs and are only merged into the unstable branch once the updated package is successfully built so it tends to be perfectly OK for daily use.
A lot of updates do get backported to stable branches and you can do it yourself pretty easily if you need an update, so running stable for servers makes sense. But for a desktop I prefer the rolling release, always updated model.
I do not like backported packages. So is unstable directly upstream stable version of packages exactly like Arch? Cos that is what I want.
Cos in Linux distro context, debian or nixos unstable repo just means it is not yet tested for the specific distro. But in fact the packages itself would be latest stable versions from upstreams.
Nix's official package repository, Nixpkgs, is the most up-to-date repository out there[1]. Especially so for the unstable channel. So I assume it would fit your needs well.
But with Nix, you can be more flexible and mix packages from stable and unstable channels very easily. In my case, the kernel and desktop environment comes from the stable channel while the rest comes from unstable.
Unstable (most often than not) is almost an exact copy of the latest branch, which means it has most of it's packages updated to latest version. Given the nature and abstractions of NixOS, unstable ends up being way more stable than most distros, you also get rollbacks for free.
But unstable repo is always a second tier citizen in most distros. This means less eyes on them. This is where Arch excels. Arch just provides packages "as is" or how it was intended by the upstream and the packages are first class citizens. So they get as much as attention as it is gonna get.
The usage of "unstable" itself is from an era where even stable versions broke a lot. This is not the case anymore. And stable repos breaking more than unstable repos in some distros atleast proves it.
Among contributors (and maybe even among the whole community), unstable is probably more popular on NixOS than the stable releases, so if anything it has more eyeballs.
The distinction also matters less on NixOS anyway, since you can (generally) freely mix and match packages from different releases.
Lots of Nix packages are totally unmodified, but many also have to be patched in able to cope with the read-only package store.
On the other hand, NixOS is, like Arch, a distro without any defaults aside from systemd. So Nixpkgs doesn't include patches that try to reshape upstream packages for the sake of some particular vision of the ideal desktop experience or whatever.
Unstable in NixOS is nothing like the horrors that wait in Fedora Rawhide and Debian Sid.
NixOS benefits from the fact that it has unit tests and that all packages are built in a consistent way across all packages.
Archlinux is a bit more stable then NixOS unstable, but not significantly so. But more importantly if you do somehow manage to update to a broken build, it's take less than a second to roll back to exactly where you were before hand.
Is unstable directly upstream stable version of packages exactly like Arch? Cos that is what I want.
Cos in Linux distro context, debian or nixos unstable repo just means it is not yet tested for the specific distro. But in fact the packages itself would be latest stable versions from upstreams.
I did read my reading but it is really blurry and hard to find information on how often the packages gets updated.
I also would like plain upstream versions of software without a distro doing any changes. And with NixOS and Nix, this is perfectly capable of fixing even the remote issues of instability that usually happens with Arch Linux.
Pretty much yes, I also switched from Arch and this works great for me.
I only had issues a couple times with broken packages, then you can either not update at all or remove those packages. It should also be possible to keep the older version of those packages in the nix config but I did not look into it.
Yeah, there are a few ways to do this. See the section on 'Pinning an unstable service' for an example of how to pull in just one package or service from another release:
With flakes I am using the master branch. You cannot get more bleeding edge and there is absolutely no danger. If something does break, I just boot the previous system. So awesome!
1. It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command. Let me explain with a lil more explanation:
THAT IS IT. You can even mention the packages you need to install in config file. You have a functional OS for desktop which can take leverage Nix package manager. AND YES! This includes wifi, grub, sound and everything basic. They all are already in the nix config file you generated. Uncomment the necessary settings and boom!2. The second point was supposed to be that it is a point release and thus have old packages and hence not a rolling release. This was based on the package search that firefox and some other packages are one version behind even on unstable repo 2 days ago. But just as I typed this, I double checked and Firefox 93 is in stable repo (21.05) and so are some of my other packages. I went back to Arch and was gonna ditch nixos due to this. So this is huge. I probably gonna install NixOS on my laptop now. DO correct me if I am wrong on this please. Because this is the only thing that is stopping me from using NixOS.