10 ms·
A lot of odd Nix hate in here, or at least extreme dislike. NixOS is so very usable. There are a lot of foot-guns but that's true of Linux systems. It takes s
by xyzzy_plugh 5y ago
A lot of odd Nix hate in here, or at least extreme dislike.
NixOS is so very usable. There are a lot of foot-guns but that's true of Linux systems.
It takes some time to get comfortable with all the different ways to configure stuff. There's a new language, a new build system, a new Linux distribution.
I've spent very little time relative to say, figuring out dpkg or systemd, or learning Bash or C or Perl, or learning the Linux FHS.
NixOS makes running deterministic systems driven from a single configuration incredibly easy.
Nix the language and tools allow you to build software deterministically and create environments where that software is available (e.g. on $PATH).
Nix Flakes is an experimental feature aimed at bringing reproducible and hermetic configurations of dependencies into the fold (i.e. lock files, ala Gem or Cargo or Go Modules).
Nix-the-tool's interactive "package manager" should be deprecated, as it's a huge pitfall for most developers. But it works and is frankly a good first step for folks coming from Apt or Homebrew.
Learning to write modules is probably the steepest learning curve, but compared to learning how to build RPMs or Dpkg or Brew recipes, it's really not bad at all. I actually find it easier and I've been at this for less than a year. Sure, if you're trying to get something working no one has figured out yet you may be in for a pickle, but that feels like it's always been true. The difference is a lot of software breaks and bends the rules and boundaries constructed to keep things and people sane. Nix does not allow that, generally, which is a very good thing. Fixing other people's garbage is the bane of any package system maintainer, it's no different here.
- throwaway894345 5y agoI haven’t used full-on NixOS yet, but I’ve used the Nix package manager quite a lot, and literally all of my forays have been miserable for a variety of different reasons. To be clear, I love what Nix aspires to be, but it doesn’t deliver on its promises IMO. As a package author, the Nix language has lots of rough edges, it’s absurdly tedious to figure out how to call various functions (what type of argument does it expect?) because it’s untyped and nixpkgs is poorly documented. There are too many other issues here to unpack. As a consumer of packages, it’s often unclear what I need to do to install anything but the simplest packages. E.g., installing vs code with some plugins (note that this differs between NixOS and other systems). Further, the CLI interfaces are confusing from a UX perspective IMO, and it’s often unclear what I actually need to use Nix well (homemanager? flakes?) the guidance is confusing and contradictory. So I don’t hate Nix, but I do have a lot of constructive criticism.
- forgotpwd16 5y ago>So I don’t hate Nix, but I do have a lot of constructive criticism. Why not write a blog post? Probably some of those issues are known but no one works on them, so a reminder isn't bad. And for those that aren't, maybe someone picks it up and tries to fix it.
- throwaway894345 5y agoThat's not a bad idea. I'll toss that on the queue.
- SkyMarshal 5y agoAlso considering posting your ideas to the Nix forums or possibly github issues, lots of activity there and you’ll probably get some good feedback before publishing. https://discourse.nixos.org/ https://discourse.nixos.org/ https://github.com/NixOS/nixpkgs/issues https://github.com/NixOS/nixpkgs/issues
- easygenes 5y agoThe UI for Nix has been under significant rework over the last ~3 years, but the new UI isn't ready for primetime yet, so none of it is made prominent now. It's getting there though. You can have a peek here: https://nixos.org/manual/nix/unstable/command-ref/experimental-commands.html https://nixos.org/manual/nix/unstable/command-ref/experiment...
- throwaway894345 5y agoThat’s good to know. I hope they really nail it!
- easygenes 5y agoThe wiki has pretty good coverage of managing vscode extensions: https://nixos.wiki/wiki/Visual_Studio_Code#Managing_extensions https://nixos.wiki/wiki/Visual_Studio_Code#Managing_extensio...
- 5y ago
- tinco 5y agoCrazy thing about NixOS is that it's so good, all the bad parts can be excused. I like to go on forums and complain about how the Nix configuration language is horrible, and there's not much documentation on how to get general things done. But that said, I'm still running NixOS on my servers. And no way that I'd ever go back to old fashioned provisioning scripts like Ansible. Just yesterday I had a problem upgrading a machine that's been running for 3 years without updates, and it wouldn't upgrade to the latest version of NixOS because of some certificate issue I couldn't figure out. Tried a couple things, nothing worked, gave up and destroyed the box. Installed the latest version of NixOS on it, pulled my configuration from git and it's back online exactly how I want it. It runs 5 websites in docker containers with a reverse proxy that automatically gets its SSL certificates from Let's Encrypt, some other services, and a tmux session with irssi. Everything neatly managed by systemd through unit files, everything set up from one simple nixos configuration. If I'm complaining about NixOS, it's because the best server operating system in existence right now has flaws. Not because I'd ever go back to a traditional linux distribution.
- m45t3r 5y ago> Crazy thing about NixOS is that it's so good, all the bad parts can be excused. I like to go on forums and complain about how the Nix configuration language is horrible, and there's not much documentation on how to get general things done. I don't think it is fair to say that Nix as a programming language is horrible, IMO, as a DSL it is pretty good and fits the domain well. It is a strange language at first and it takes some time to learn all its quirks. Also, it lacks better tooling, things like LSP for example (there is one but it is slow and limited last time I tried). But just claiming the language is "horrible" is really unfair.
- WastingMyTime89 5y agoI have no opinion about NixOS but every time I read someone touting its merits I feel like I live in a parallel universe. NixOS seems to solve problems I never had at extreme costs to its general usability. I don’t care that I can rebuilt a computer identical to mine in minutes. I don’t change computer often enough for it to matter and the tweaking I do is minimal because frankly tweaking configuration is not fun and feel like a gigantic waste of time. Same things for reproducible builds, I like them as a developer for the things I work on because they make things easier to manage and debug. I couldn’t care less as a user. I just want things to work. I guess it could make sense for servers as an alternative to provisioning tools but then it seems to me like it’s competing with docker and kubernetes and I have never seen a convincing argument about why it would be better. I think that’s why you see a lot of things you view as dislike. Plainly speaking I think most people don’t see the point.
- xyzzyz 5y ago> I guess it could make sense for servers as an alternative to provisioning tools but then it seems to me like it’s competing with docker and kubernetes It’s not competing, it’s complementing. Think of it as a fully deterministic “docker build”.
- WastingMyTime89 5y agoYes but « docker build » already exists and can already be made deterministic so it’s indeed somewhat competing. Would anything be easier by using Nix? Right now it seems to me like a large ordeal with little to no benefits and my interaction with the Nix community hasn’t been very convincing. A lot of Nix users seem to believe determinism and reproducibility of everything to be enough of a justification in itself. I don’t think it’s worth the pain.
- bergkvist 5y agoThe biggest limitation of using Docker for building images is that it does not allow for composition. You can't simply say you want to combine a Python and Rust image for example. With dockerTools from nix (https://nix.dev/tutorials/building-and-running-docker-images https://nix.dev/tutorials/building-and-running-docker-images), this kind of composition is easy. You also end up with significantly smaller image sizes - containing only exactly the dependencies needed for the image to work, which is also good from a security perspective - since it decreases the attack surface.
- KronisLV 5y ago> A lot of odd Nix hate in here, or at least extreme dislike. I don't have any doubts about the likes of Nix or even other attempts at improving the reproducibility of building and installing packages being technically superior to what we have now in some ways. But at the same time, you can't forget about people and in some ways the industry taking the path of least resistance whenever possible. You want to introduce a good but somewhat complicated way to manage packages? People will simply use "apt" while its UI/UX/DX is easy to get a hang of. People get sick of differences between environments and how hard it is to deal with everything from resource constraints, port binding, configuration management, persistent data handling etc. in *nix? Many of them will turn to shipping VMs, tools like Vagrant or more recently - Docker. Thus, it stands to reason that for any tool to become popular amongst the "common folk", not just brave early adopters or very technically able people, the tool needs to be easy to use. I guess that's also why i'd say that more people use Linux distros (GNU or otherwise) as opposed to something like the *BSD OSes, even if those also have some notable benefits in regards to stability, networking performance, in-tree development etc.
- easygenes 5y agoYeah, good points. Nix has been as-yet very pointedly a developer-centric ecosystem. And not just that, but developer-centric for people who favor functional programming in general. There's some work especially in the last few years to make it all more approachable, but that's the background. Wait a couple more years and you will see more projects like Nix GUI here start to mature and then it will get very interesting beyond people who have backgrounds in, e.g. distributed computing and Haskell.
- Ericson2314 5y agoNix is common among consultancies because the more switching between projects you do, the more it pays off. If you like every 6 months (or merely every job change!) fuck with APT, your bashrc, etc. with a little stack overflowing during onboarding, whatever. It's too rare to be worth optimizing; I get it. If you switch projects every 2 weeks, the calculus changes greatly. I do work at one of them now, but I got into Nix as a student hobbyist, when I was also rotating through homework assignments and personal projects quickly.
- grawp 5y agoNix(OS) purely with Flakes i.e. without channels is so f good that I'm not using it just as my daily driver on a PC and to package software and create development environments... I also replaced Buildroot with it for building embedded images for SBCs. Lifechanging experience.
- totony 5y agoI have went pretty deep in nix recently and imo the "Fixing other people's garbage is the bane of any package system maintainer, it's no different here" + high learning curve + lack of xattrs and permissions support in nix store makes it a bad OS. The amount of custom code to fix "issues" and "issues" that are only fixed because the maintainer thinks he knows better than the dev is too big to be maintainable. Still a good package manager for eg macOS if you dont need that.
- Ericson2314 5y ago> Fixing other people's garbage is the bane of any package system maintainer, it's no different here. I honestly think it's hard for "Nix to Nix" simply because by trying to make everything reproducible, it is dealing with more of upstream's garbage, and "reifying" the hoops that people jump through doing sysadmin things in code looks scary. I really want more upstream developers to use Nix, so they might loose their myopia, and start thinking of the the FOSS ecosystem as a whole, and not just their own packages within it. Nix is the best way to get the bird's eye view, I am sure. Just try not to gag at what you see! [1] Though I still maintain that contributing to Nixpkgs is much easier than contributing to e.g. Debian or Fedora.
- easygenes 5y agoYeah, exactly. Nixpkgs is basically the largest and most up to date repo in the Linux world now. Most of that’s coming just from the small existing core community. That has to say something for the efficiency of it.
- totony 5y agoReproducibility is not the only issue they're facing. I think the mentality extends to more than just fixing linker issues, e.g. this https://github.com/NixOS/nixpkgs/issues/9656 https://github.com/NixOS/nixpkgs/issues/9656 At the end of the day, I much prefer trusting upstream than having to trust packagers to do everything right.
- Ericson2314 5y ago
- deltasixeight 5y ago> A lot of odd Nix hate in here, or at least extreme dislike. I hate this expression. I'm a nix user. But if you can't understand why people dislike it... you're the one that's odd and out of touch. If you want people to adopt nix the worst way to convince them is to call their behavior odd when it isn't. The reason why adoption of nix is so low is trivial. High initial learning curve and it's so different from everything else that's out there. The only reason why I got over that learning curve is because my company uses it. If it wasn't for my job I would not have have the will power to climb over that learning curve. Like seriously can you not see that someone is not willing to spend months learning nixos when they can get a pretty much from point A to point B using a turn key solution like ubuntu? Nix is great. But you need to climb over the initial hump. That is all.
- Ericson2314 5y agoWhat we dislike is everything talking about the costs, and not the benefits. Fine if it's not for you --- I personally care more about institution and upstream adoption than getting more random end users at this point --- but people passing off these one-sided cost-and-no-consideration-of-benefits analyses as engineering decisions is a bit grating. To me Nix is hard, but Nix is worth it. I acknowledge these people's pain, now would they acknowledge my pleasure (ideally without writing it off as that of a cult inductee! :)).
- m45t3r 5y ago> What we dislike is everything talking about the costs, and not the benefits. Exactly. I tried to push really hard our company to use Nix/NixOS (and maybe in our case nix-darwin too, since the majority of engineering uses macOS), but it never went anywhere (I did convert a few of my colleagues to use NixOS though). But why? Well, onboarding is a pain in my company. We have some Ansible scripts that always break in some innovative ways, so it takes a whole day to setup a new machine for a bunch of engineers. Sure, partly of the fault is the fact that our Ansible scripts are really hacky (in some steps they still call some Bash scripts instead of using Ansible DSL for example), but Ansible is simply lacking in some places to have a really pleasant experience. If we could use NixOS though, this would be a very different matter. I use NixOS in the same company, had the same configuration for pretty much 1 year, and also survived a broken laptop and setup my whole setup in like 30 minutes (most of time spend downloading packages actually). I even separated part of my NixOS configuration in another repository so other engineers using NixOS can also make use of it. Yeah, it took a long time to get where I am currently, but nowadays I just stopped worrying about managing system, system update breakages, and anything like this. I can just use my system, fully up-to-date, and I know if something breaks, I can revert. It is beautiful.
- Ericson2314 5y agoThanks you too, I think this has actually been the thread with the least sloppy Nix hate yet!
- deleted 5y ago[deleted]