6 ms·
Love to see more adoption of Nix and NixOS. I started my Nix journey a little over a year ago, and I regret not having switched sooner. A package-manager that
by anandsuresh 5y ago
Love to see more adoption of Nix and NixOS.
I started my Nix journey a little over a year ago, and I regret not having switched sooner. A package-manager that also ships an operating system that can be customized from the bootloader up, using a purely functional programming language is the perfect configuration management tool!
It does have some rough edges, and I did lose some hair figuring things out early on, but it has been getting better with each passing day. Pretty much the entirety of my setup at home is now built by Nix and runs NixOS, including my Macbook Air (runs NixOS on ZFS), and two Mac-Minis that PXE-boot a custom NixOS served by a Raspberry Pi 4 running a custom NixOS configuration that also acts as a firewall connecting wirlessly to my ISP's router. The Mac-Minis also double as build machines which makes for a pretty smooth experience when I'm building anything on my work laptop (a 2020 Macbook Pro running Big Sur) that I dock with my CinemaDisplay, which is wired thru an unmanaged switch to the rest.
So far I haven't missed any packages that I could not find in nixpkgs, or customize just the way I wanted to. The community is pretty responsive and quick to merge any pull requests for fixes/upgrades. I would whole-heartedly recommend switching to Nix/NixOS/Nixpkgs.
- SkyMarshal 5y agoSame. I've been meaning to take the time to learn and switch to NixOS for several years now, and finally had some time to do it this past spring. I haven't been this happy and giddy with a new piece of technology since I completely eliminated Windows for Ubuntu back in 2009. There was a learning curve that took several months, but now that I've got everything I had on Ubuntu running smoothly on NixOS, I could never go back. And this for my daily driver, not a server or anything. My favorite part is how it enables rapid experimentation with different build configurations, without any concern about borking the current working build. If the new build breaks something, a single command rolls it back to the prior working build. If the new build crashes the system, just reboot and choose the prior working build in GRUB. When you're logged back in, call the rollback command to point the system back to the working build. This makes learning and testing both Nix itself and your particular system build faster, easier, stress-free, and just downright fun, which is invaluable. Declarative, deterministic, immutable OS builds is a significant step out of the tarpit of software complexity.
- anandsuresh 5y agoCongrats on your journey out of the tarpit! :)
- SkyMarshal 5y agoYou too :)
- bambambazooka 5y agoIs your config available? It sounds very interesting and complete. Especially the PXE boot from a pi sounds great!
- anandsuresh 5y agoNot in any usable form. But I do intend to blog about it once I clean it up. :)
- heinrichhartman 5y ago#MeToo. I am using two OSX machines and two remote Linux machines for my day-2-day private/work related stuff. Nix+home-manager allows me to have all productivity tools consistently available across all platforms with minimal effort [1]. Dotfiles/shell config lives in a separate folder [2] and is not managed in nix. Tangent: Secrets are are encrypted with git-crypt (https://github.com/AGWA/git-crypt https://github.com/AGWA/git-crypt) and live in the same repo [3]. I generate GPG keys for every new host I am working on and check in the public keys to the repo as well, then "approve" them from an authorized host using `git-crypt add-gpg-user ... && git push` [4]. This gives strong encryption without managing passwords by hand. [Copy of private key is kept in bitwarden as backup]. Getting the hang of Nix took me a while. I wrote-up my journey to get the latest-gratest emacs installed here [5]. But now I am over the bump, and it's adding value to my workfows. E.g. I switched some projects from docker to nix-shell for lightweight virtual-envs, e.g. [6]. [1] https://github.com/HeinrichHartmann/dotfiles/blob/master/nix/home.nix https://github.com/HeinrichHartmann/dotfiles/blob/master/nix... [2] https://github.com/HeinrichHartmann/dotfiles/tree/master/.shell.d https://github.com/HeinrichHartmann/dotfiles/tree/master/.sh... [3] https://github.com/HeinrichHartmann/dotfiles/tree/master/secrets https://github.com/HeinrichHartmann/dotfiles/tree/master/sec... [4] https://github.com/HeinrichHartmann/dotfiles/tree/master/public-keys https://github.com/HeinrichHartmann/dotfiles/tree/master/pub... [5] https://www.heinrichhartmann.com/posts/2021-08-08-nix-emacs/ https://www.heinrichhartmann.com/posts/2021-08-08-nix-emacs/ [6] https://github.com/HeinrichHartmann/HeinrichHartmann.github.io https://github.com/HeinrichHartmann/HeinrichHartmann.github....
- yissp 5y ago> #MeToo maybe best to avoid that https://en.m.wikipedia.org/wiki/Me_Too_movement https://en.m.wikipedia.org/wiki/Me_Too_movement
- altgans 5y agoI switched to NixOS half a year ago. The reason? I fell in love with literate programming (I use [1]); being able to write (and read) your whole OS configuration is the dream! 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 https://github.com/driusan/lmt [2]: All the "hacker" stuff: kernel modules, network hardening, ...
- k__ 5y agoCool. I just played around with R the other day and it would use MD too to generate HTML/PDF. It uses Knitr. https://kbroman.org/knitr_knutshell/pages/Rmarkdown.html https://kbroman.org/knitr_knutshell/pages/Rmarkdown.html
- altgans 5y agoThat sounds like a nice way to do it, too. I heard about it before, but don't know R, so I didn't really consider it. 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 https://github.com/srid/emanote 2: https://wiki.dendron.so/ https://wiki.dendron.so/ 3: https://github.com/zyedidia/Literate https://github.com/zyedidia/Literate 4: https://orgmode.org/worg/org-contrib/babel/intro.html https://orgmode.org/worg/org-contrib/babel/intro.html
- AnIdiotOnTheNet 5y ago> Love to see more adoption of Nix and NixOS. I don't want a 'journey' to use my OS. I don't want to learn a whole new language and set of overengineered abstractions to solve what I see as, at most, 5% more of application installation problems that are already 75% solved by package managers[0]. If the Nix community wants more people using Nix, they'll have to make it more attractive for those of us who do not want to waste so much time needlessly learning new stuff to do the same things we're already doing. [0] which are already an overengineered and under-delivering solution in my opinion.
- sjustinas 5y agoThat's absolutely fair, I don't think either the parent or the NixOS devs implied in any way that it should be the right fit for everyone or 100% of the Linux distro market share is the end goal. For me, the benefits outweigh the quirks of the language. As my alternatives to manage multiple machines consist of: wonky Bash scripts, similar tooling but bolted-on on top of the distro and with no built-in rollbacks (Ansible, Puppet, etc.), or trying to get everything right manually, Nix does not seem like the worst out of this bunch.
- IshKebab 5y agoI agree. I love the idea of Nix. At least what I think is the idea - basically Bazel as a package manager. But the actual implementation is inaccessible. If someone could make a user-friendly implementation of the Nix concept I think it would be very popular.
- ris 5y agoWhat I'm hearing is "I really don't like the way traditional systems are designed and I don't want to have to learn anything new!" Nix is different, unapologetically so, that's the issue. And if it had to be more orthodox to win over a few more itinerant users that would make the whole thing pointless.
- AnIdiotOnTheNet 5y agoI'm not asking it to be more 'orthodox', I'm asking to not have to spend months scouring poor documentation to learn a new language and toolchain to gain the very few benefits Nix provides over the existing systems. If Nix is so inherently complicated it cannot deliver that, then why would I want it? Ultimately I want less complication in my life, not more, and Nix very much does not provide that from what I can see.
- muth02446 5y agoThis super interesting to me as I am currently PXE booting Ubuntu which is a pain every two years when I switch the new LTS release. Do you have some pointers or configs to your setup?
- anandsuresh 5y agoNot in any usable form. But I do intend to blog about it once I clean it up.
- ashtonkem 5y agoThere’s a small amount of homelab stuff I need to spend the time porting to nixos. Grafana is in there, for example, but pihole is not. I currently run a weird mix of VMs because of this, and I’d like to make that more homogenous.
- dnr 5y agoHate to make a boring me-too comment, but I feel the same: I've been using it a bit over a year, and I wish I had started even sooner. Now I've got two laptops and a NUC, plus two odroid-hc4's, all on NixOS. All the system configuration that used to be half-broken ansible and a pile of scripts (plus all the one-off hacks that weren't even captured anywhere) is now nice pure nix configuration. I've nix-ified builds for a bunch of personal projects too. Yeah, it took a few months to learn, and there are still lots of rough edges, but going back to a non-Nix linux distro would feel like going back to windows. I agree with the sibling comment that it makes me feel happy and giddy, like no other technology I've learned recently.
- spindle 5y agoA boring "me too" from me too!
- whateveracct 5y ago> So far I haven't missed any packages that I could not find in nixpkgs, or customize just the way I wanted to. And it's honestly not that hard to package things that aren't yet Nixified. Any C project is easy - I've learned more about cmake from mkDerivation that anywhere else. And overlays make it easy to make tweaks to a build without straight-up forking. Beautiful!
- joepie91_ 5y ago> I've learned more about cmake from mkDerivation that anywhere else. This is something I find really fascinating about Nix (or more precisely nixpkgs) that gets overlooked a lot: it is essentially a giant database that documents how different build tools work, how different projects are built, and so on, in an exhaustive and consistent manner. That can be an extremely valuable resource to have in your back pocket, even if you're not actually using Nix!
- anandsuresh 5y agoCould not agree more. I've learned more about build systems and different compilers by reading through Nix code than any other endeavor in the past.
- spindle 5y agoI always think it's worth mentioning explicitly that NixOS makes it not just possible to put everything including the root file system on ZFS, it makes it completely easy.
- GekkePrutser 5y agoIt's not unique at that though. FreeBSD has had this for a decade. And Ubuntu is adding it now as an installer option. PS: I do like the idea of NixOS and its USPs which are indeed unique :) For me what's stopping me is the learning curve. I don't mind learning per se but if I put the time in it I'd like it to be for something that's useful in more places. Like ansible.
- pxc 5y agoWhat's interesting about NixOS' seamless NixOS support is that ZFS can't be included in the Linux kernel, and so that kind of integration takes more work with Linux distributions, so relatively few distros have it down pat. BSDs don't face that kind of integration challenge, since they can just ship ZFS support directly in their kernels. They have recently faced an integration challenge of their own, though: rebasing their ZFS implementations on OpenZFS (f.k.a. ZFS on Linux). Anyway ZFS is great and I hope OpenZFS' multiplatform support gets so good it can become popular on Linux, *BSD, and macOS all at the same time. :D
- altgans 5y agoCan you elaborate a bit more on why ZFS is great? I am currently thinking about doing "one final install" for my system, and am undecided between BTRFS and ZFS. I noticed that most "hip" people use ZFS, but based on my meager research it seems actually recommended and designed for "big" data-center setups. Why is ZFS good for small PC setups? --- If am being honest I just want something that works reliably, is easy to extend and doesn't require maintenance. Maybe ext4 is good enough?
- pxc 5y ago