by altgans · 5y ago · 0 comments
There are few bad sides to NixOS though.
The community consists mostly of programmers, which means I am missing some creative tools (mockups, mindmaps, ..). In the future I will be able to provide/build them myself, but it is not a smooth transition from my previous arch setup.
Also the whole documentation sucks: There are three (!) official manuals + the home-manager manual + Nix pills + YT + random blogs where I have to piece everything together.
Still I find NixOS superior to every other OS (windows, linux) I have tried so far. I just feel free and am not afraid to fuck up anything [2], as I can just go to a previous generation when it doesn't boot.
Lastly, I can save my whole config in git and am free to try new tools -- If I don't like them, I just remove their line in my config. No more chasing after random install folders! (Except in home..)
[1]: https://github.com/driusan/lmt [2]: All the "hacker" stuff: kernel modules, network hardening, ...
But I'm seeing so much Nix news these past few weeks, I guess it'll be better in a few years!
The difficulty comes from the advanced topics. Modularizing your setup, writing your own packages, generally going off the beaten path.
I did not do any of that (yet). I will in the future, but I am fine with my low-level setup. One machine, one user. A bit later I moved to Nix Flakes (which is just an additional wrapper file around the previously written config) and added a few overlays.
My trick: I downloaded every single public "NixOS" dotfile repository I could find, and then just used "ripgrep" to find anything I was interested in.
Another cool trick I read is setting up a VM to test a small config and get a feeling for it, and then decide if yo want to proceed.
SO many times in the past, I'd be concerned about installing new things because they'd break my otherwise pristine developer environment. Yes, rvm/nvm/virtualenv and others help, but they fail to hold a candle to the nix-shell!
Yeah this part is messy, and why I always disclaim that I had a learning curve of several months to make the transition. However, my system setup is a little more complex than the standard install - mirrored ZFS root drives on dual m.2 drives, with mirrored boot partitions. That wasn't in the docs, needed a blog post to explain it [1].
>I also really don't like wasting so much time on tinkering with my system the way I used to do.
I've found that once you get everything configured to your liking, you spend similar or less time tinkering than on other OS's, just because the entire system config is captured in a single config file now. There's some up-front learning and work required, but after that it's smooth sailing.
[1]:https://elis.nu/blog/2019/08/encrypted-zfs-mirror-with-mirro...
https://nixos.org/manual/nix/stable/
https://nixos.org/manual/nixpkgs/stable/
https://nixos.org/manual/nixos/stable/
Anyone looking into transitioning to NixOS should take a leisurely weekend and just read through all three of those first. Being at least familiar with all of what's there will make getting up and running a lot smoother.
Any time you need a package that's not in nixpkgs, feel free to submit a packaging request for it:
https://github.com/NixOS/nixpkgs/issues/new/choose (Issues -> New Issue -> Packaging Request)
Especially if you explain that it's a popular tool in the creative community, that kind of thing is useful for the Nix packaging team to be made aware of. Even if someone doesn't package it right away, there's a good chance it will make it into the next 6-month release cycle.
I just played around with R the other day and it would use MD too to generate HTML/PDF.
It uses Knitr.
The reason I chose lmt is that it correctly keeps the markdown language syntax of the code blocks. That means I can put my literate config into my Zettelkasten [1] or [2] and watch it pretty-print in the browser.
There are also literate [3] and org-babel [4], but I don't think they are future proof. .lit is a random format and .org basically requires Emacs+orgmode.
1: https://github.com/srid/emanote
Literate/.lit: I don't know, I guess not.
Emacs/orgmode: Yes, this also does syntax highlight. And you can edit the code-block in a separate window as if it was a "real" source code file. I've been using this for almost two years now. Personal opinion: I don't think the benefits of Emacs outweight the cons.
Until you have to install the latest NVidia drivers, I suppose.
1: https://nixos.org/manual/nixos/stable/#sec-x11-graphics-card...
This applies regardless of whether you are packaging/updating something in the package set yourself, or using something that someone else packaged.
The same happens on all package managers...