5 ms·
I've been on the fence about Nix. I've wanted to love it (and do love the concept), but between the Waiting-for-Godot situation for flakes, the weird language,
by _huayra_ 2y ago
I've been on the fence about Nix. I've wanted to love it (and do love the concept), but between the Waiting-for-Godot situation for flakes, the weird language, and the occasional political infighting I've seen pop up about the community, I still haven't switched.
I'm no language expert, but I genuinely don't understand why it wouldn't have been better to build some equivalent DSL in Haskell to do this given the similar lazy nature of the language. DSL for most things, then open the hood and do actual Haskell for crazier use cases. I get that Nix started before Haskell became less academic and slightly more usable in the mainstream and has built up momentum, but the lack of tooling for understanding what is going wrong when incrementally building up a config is very confusing.
I'd be curious if anyone has go to or from NixOS compared to declarative distros compared to the atomic distros like ublue [0] and has any thoughts. I'm a bit split about what to move to next (though my >5 year Tumbleweed install on most of my machines is holding up no problem).
[0] https://universal-blue.org/ https://universal-blue.org/
- Zambyte 2y agoI switched away from Nix OS and eventually landed on GNU Guix, which I have stayed on for about 4 years now. One of the main reasons I switched away from Nix was because of the language, and how underdocumented it all felt. GNU Guix was a breath of fresh air, using a language with decades of academic backing outside of the context of Guix (SICP was awesome for getting into it) and the whole system is very well documented, with a nearly Arch-wiki quality manual built into the OS in the info pages.
- jonotime 2y agoOh, I'm interested. Are you using it on servers, or desktop? My concern is the community is small, while Nix's has been booming.
- bjoli 2y agoI am using it on my home server that serves my web page and also a lot of things for my home network. It runs some guix containers and some VMs. Nothing fancy. All declared in a couple of files.
- Zambyte 2y agoI'm using it on my server, laptop, and desktop. The community may be relatively small, but it is super active and easy to engage with. As a testament to how active the community is, Repology[0] ranks GNU Guix as the 5th largest repo by number of packages. Ahead of even some much more well known distros like Fedora and Gentoo. [0] https://repology.org/ https://repology.org/
- SuperSandro2000 2y agoGuix has stripped away the biggest plus from NixOS: the module system and replaced it with a half assed system
- bjoli 2y agoI mean, modules are just regular guile modules. It feels somewhat clunky, but at the same time you can use guile's introspection to do fun stuff. I always found it more flexible, but on the other hand I never liked NixOS modules.
- SuperSandro2000 2y agoYep, it feels somewhat clunky when you are used to NixOS modules :P
- tempfile 2y agoCan you say why you think nix modules are the "biggest plus" from NixOS? They don't even make the top 5 for me.
- SuperSandro2000 2y agoWhen installing Nextcloud I basically have the following 4 options: - Do everything by hand and read through the docs on every update. Does not sound like fun. - Use someones Ansible playbook and hope that they update it on time. meh, also customizing it is not a walk in the park and requires some effort on my side. - Use the upstream Docker container which has the same customization problem as Ansible - Use the NixOS module. Updates are fast. Configuration changes are being handled by NixOS and I can easily inject a nginx location block in my declarative config. I also can easily describe extra bits like pre-compressed assets which then are served by nginx in my normal workflow without having to think about them at all on updates. overlays and the module system are THE killer features. Almost no one else has something comparable to offer and if those powerful features are well understood, they can save you soo much hassle.
- 2y ago
- gf000 2y ago4 years can be a very long time in a project, especially when the "network effect" hit around that time, where the active user count (and contributions) grown significantly. Also, the language is quite simple, it's just foreign and you felt more at home with Scheme, so you might not have given Nix as much of a chance. This is the classic "simple vs easy" from the Hickey talk. Documentation is no perfect, but has become quite a bit better over the years, and many of the problems that still linger are simply architectural ones of the nixpkgs repo, irrespective of language and wouldn't be solved in any other language/DSL in itself.
- Zambyte 2y agoI was familiar with Haskell and had never used Lisp before using Nix (which was before I tried Guix). The fact that the Nix language was more foreign to me than Scheme seems like an important point against the language. Also, I used NixOS for months; it's not like I just hopped to it and hopped away from it after seeing the language. It was months of compounding frustration.
- pzmarzly 2y agoI'm using Universal Blue now (Aurora, i.e. KDE flavour) and I'm very happy with it. With its large amount of pre-installed packages and drivers (including proprietary ones), I still didn't need to install any custom package (rpm-ostree) or otherwise modify the OS config (except for turning off SELinux in /etc/sysconfig/selinux). It's the most pragmatic distro I've used so far. SaveDesktop[0] (saves flatpak apps and DE configs) and mise-en-place[1] (declarative shell environment manager) are making my installation backupable and quite reproducible (not to NixOS standards though). For software that's not in flatpak, docker or mise, toolbox[2] and distrobox[3] are available for the rescue. Both work really well (toolbox seems better for CLIs, distrobox for GUIs), but all atomicity/declarativity is lost. [0] https://github.com/vikdevelop/SaveDesktop https://github.com/vikdevelop/SaveDesktop [1] https://mise.jdx.dev/ https://mise.jdx.dev/ [2] https://github.com/containers/toolbox https://github.com/containers/toolbox [3] https://github.com/89luca89/distrobox https://github.com/89luca89/distrobox
- SuperSandro2000 2y agoDocker and flatpak suck so much if you want to customize anything
- tomn 2y ago> I'm no language expert, but I genuinely don't understand why it wouldn't have been better to build some equivalent DSL in Haskell to do this given the similar lazy nature of the language. My impression is that you can't really build nix as a DSL in haskell, because the core insight of nix is to introduce the "derivation" function into a pure programming language, whose behaviour is pure (the output is determined by only the inputs), but whose implementation is very much not (it builds packages from a specification). There may well be a work-around for that (it's been a while since i haskelled), but it's likely to end up with a result that's less clean than it would ideally be. Personally I find the nix language to be a pretty good match for the tasks it is used for (though some basic static typing would be nice). From the outside, i can see why it looks odd, but from the inside, there's not much of a desire to switch to something better, because the language isn't the thing that gives people trouble after the initial learning period (which would exist with any host language).
- nothrabannosir 2y agoI don’t understand—the language itself is completely contained and separate from the derivation. Evaluation could be done in any language and the derivation will remain the output. You can absolutely have a better language generate derivations, surely? Hell, you could use Python typescript or go if you wanted to. They’d even be completely compatible with the unholy mess of cursed bash that is stdenv. What you can’t port over to another language as neatly are the modules. Good riddance, id say. Undebuggable spaghetti from hell. > from the inside, there's not much of a desire to switch to something better, because the language isn't the thing that gives people trouble after the initial learning period (which would exist with any host language). Unfortunately I have wasted enough of my life to call myself “on the inside” and IMHO the language itself is close to the number one threat to wider adoption of nix.
- tomn 2y ago> You can absolutely have a better language generate derivations, surely? Yes, hence guix. The issue is that it doesn't fit well into a pure functional language like haskell if you want to allow import-from-derivation or basic functions like "readFile", without putting everything in IO (complicating the DSL). https://nix.dev/manual/nix/2.25/language/import-from-derivation https://nix.dev/manual/nix/2.25/language/import-from-derivat... What you can’t port over to another language as neatly are the modules. Good riddance, id say. Undebuggable spaghetti from hell. Not that it matters, but why not? Modules are written in the pure-functional bit of nix, so could be expressed in practically any language. >> from the inside, there's not much of a desire to switch to something better, because the language isn't the thing that gives people trouble after the initial learning period (which would exist with any host language). > Unfortunately I have wasted enough of my life to call myself “on the inside” and IMHO the language itself is close to the number one threat to wider adoption of nix. I guess different people have different experiences. This was mainly based on my personal experience, but if you look through the help section on discourse, the questions are not about the language (at the time of writing i didn’t find even one in the first few pages): https://discourse.nixos.org/c/learn/9 https://discourse.nixos.org/c/learn/9 There also just doesn't seen to be a big push in the nix community to replace the language. Nickel exists, but i don't see the push for that from the nix side.