💾 Archived View for ait.place › nix.gmi captured on 2023-12-28 at 14:59:01. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Written on 28.11.2022
I am currently writing this on nixos. My experience has been a conflicted one. Not because nixos is in any way bad. It's just that the highs, underlined how low the lows really are.
I guess I'll do a quick overview over what distros I have been using before this.
I used Arch linux from ~2018 to 2021. The reason I switched away was because there was a bug with the kernel (both the regular and lts didn't boot) and my cpu was affected.
https://bugzilla.kernel.org/show_bug.cgi?id=212133
I then moved to fedora 36 because I wanted a little more stability in my computing experience. The new and shiny stuff didn't really interest me anymore. But there was some problems with fedora, there are some things that I wanted out of a distro that fedora did not provide. Like for example using systemd-boot, networkd, getting rid of all the gnome stuff and having access to the software I wanted.
Nix has fasinated me for quite some time and I have always wanted to try it out. So I did a lot of researh before even trying to install the os.
First thing I started doing was installing nix on top of my fedora install and start making some docker containters. This gave me familiarity with how nix the language is supposed to function.
I then moved on to a vm and installed nixos on it. I tried to set everything up and this is where I realised the biggest struggels of the whole nix enviroment is.
The documentation and nixos's giant nature. I have read that it's gotten A LOT better as of recent years. I can see that there has been effort in trying to tidy things up.
The problem that I ran into was making a list for non-free packages to allow. When you try to install a non-free package, nixos by default does not let you. This could be circumvent by either using the env "NIXPKGS_ALLOW_UNFREE=1" or setting "nixpkgs.config.allowUnfree = true;".
I don't really like non-free applications so there is a third option for people like me, and that is to make a list of non-free packages to allow.
To do this the documentaion says to set the following:
{ allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "roon-server" "vscode" ]; }
This will throw up an error because "lib.getName" is wrong and does not exist. The real way to do it is with "lib.strings.getName".
Now I understand that this seemed like a simple fix, but the documentaion never even mentions this and makes you scratch your head and make you wonder.
I then felt like I had to go out of my way to fix this documentaion mistake, but making some change to nixos is a giant chore.
I downloaded the whole nixos git instance, which is 3gb.
Made my one line change and tried to setup a pull request, but it felt intimatating with the amount of trivia they expect you to anwser.
I said screw it and went on with my day. I do regret it kind of, because the mistake is still there as of this writing.
I guess everybody that uses nixos just allows all non-free software on their install so this documentaion has not been updated.
Edit: I tested it and now "lib.getName" works. I guess the upgrade to 22.11 made it work. So no need for me to make that pull request.
I hope error messages improves over years that I'll be using nix, because I feel like most of the new users will be turned off when nix gives you a cryptic message that is impossible to decipher.
It's a hard issue to outright solve. And it would not be as big of deal if the documentation was really good and easy to find.
I breifly touched upon it, but the main repo is 3gb and it took a good 15 minutes before it was done downloading and doing ''git things''.
I guess I have always stayed on the simpler sides of the foss world and have never really encounted something that does not care about it's size and scope at all.
The window manager I used while on fedora was leftwm. When I searched for leftwm on nix I see that it's packaged and could be installed, not only as a regular package but as "services.xserver.windowManager.leftwm.enable" so it must work, right?.
Well as of this writing, it does not. Keyboard shortcuts does not work. Now don't get me wrong. I'm not mad, I'm not dissapointed, I'm not frustrated. But I am now aware of there being packages which are unmantained in the standard nix repo. I tried looking into it, but my expertise failed me and I could not find the reason for it not working. The leftwm nix package has no mantainters listed. And I moved on to using my old dwm with patches, which has actually been an amazing experience that I love. I guess something good came out of it. It's still a shame that leftwm is in the state it's in.
I don't really want to bother anyone, because I love the people working on leftwm. I don't think badly about anyone working on the leftwm package and leaving it. Leftwm is a fast moving project that makes braking changes constantly.
There is a option to change the networking backend to using networkd instead of NetworkManager.
The problem is that when you do "nixos-rebuld switch", it times out because networkd does not refresh gracefully. I hope this gets fixed someday as I would love to use networkd, but I guess I'm stuck on NetworkManager for the time being.
I love my experience with nixos and I'm going to be using it for at least some years to come.
It's really how a DYI distro should be and I love how I can completly change some core functionallity very quickly and safely.
Thank you for reading my ramblings and would love to get some feedback.
Send me an email at aiten@posteo.net or on the fedi @ait@the.ait.place.