Earlier quoted context omitted.
> It is like Ansible or Terraform for a semi-idempotent distro "Like" does a lot of work here. Those systems go one way: what if we applied this concept to managing existing systems. Nix goes the other: what if we built a system around this concept. I think that's a nice elevator pitch, but misses a lot otherwise.
> Nix goes the other: what if we built a system around this concept. This is what I'm referring to. There isn't anything currently as far as I'm aware that takes it as far as Nix. Sure, Arch has archinstall and there is also cloud-init. There are examples of using JSON to help manage that: https://github.com/archlinux/archinstall/blob/master/example... But, ultimately I believe a lightweight Go/Rust tool that takes a…
How Nix and NixOS get so close to perfect
171–180 of 183 posts
Re: How Nix and NixOS get so close to perfect
#172Earlier quoted context omitted.
Maybe having terrible UX is starting to look like a fundamental flaw here? I know that UX sounds like something that should be “polishable”, but at this moment I have been hearing for years about Nix being great in principle but not that great in everyday practice. (Cf. Linux on desktop…)
I'm not convinced that Nix isn't polishable. Because the language is declarative, and can be pure if using flakes, it could readily be extended with simple tooling and UI configuration that make it look and feel like other distros, with the more low level constructs still available to advanced users. It's still in a phase where most users are power enthusiasts, so polish hasn't been priority #1, but someone will come…
As a diehard Emacser, Emacs has been waiting about thirty years for someone to make it a prettier wrapper.
It's possible to be so power-user-friendly that in practice no one wants to make it end-user friendly.
Re: How Nix and NixOS get so close to perfect
#173The main issue is that nixpkgs is unapproachable to new users. Yes, there is the documentation at https://nixos.org/manual/nixpkgs/stable/ , and it is quite long. It's not enough.
Every Nix tutorial basically starts off with "this is how you create a new package. You get your source with either ./. or by using a fetcher to download a release from the Internet. Then you use mkDerivation to package the release by writing the install scripts." OK, cool.
Then you want to package a Go program. Cool, let's copy from an example in nixpkgs. Well, stuff in nixpkgs doesn't use mkDerivation, it uses buildGoModule, and it references weird SHA hashes for the vendor? How do you get those? So you go to https://nixos.org/manual/nixpkgs/stable/#ssec-language-go and it doesn't explain to you how to get the vendor hash. It doesn't explain to you why nixpkgs uses buildGoModule and not mkDerivation. So you don't really know how to continue and you feel pretty stuck.
The thing is, a) buildGoModule is a higher-level function that will return the result of mkDerivation in a way that reuses everything that is common to Go modules. So it makes perfect sense from the perspective of a maintainer who wants to reduce the size of nixpkgs as much as possible, which is already one of the largest Git repositories on GitHub.
b) Nixpkgs library functions like buildGoModule, with the need to maintain the separate vendor hash, come from a desire to write pure Nix functions without network access, i.e. there is no need to re-download the vendored dependencies if they already exist in the local Nix store cache. Indeed, the fact that there is only a single vendor hash represents a pragmatic compromise; whenever any dependency changes, the entire vendored dependency tree needs to be re-downloaded and rebuilt; if the hashes of the individual dependencies were tracked, then Nix would understand to only download the dependencies which had changed. The reason why Nix can't compute the dependency hashes of each dependency internally, and only then try to check the Nix store and see if they exist there, is because Nix does not yet support recursive calls: https://github.com/NixOS/nix/issues/13 (nearly ten years old). However, the RFC for adding support was finally merged: https://github.com/NixOS/rfcs/pull/92 and so support will come soon enough.
So basically: Given that most developers need to produce containers to ship to production, and Nix already makes it possible for developers to ship containers, Nix needs to make it easier for developers to build their services/programs in Nix. Program build support is already pretty great for some specific ecosystems (e.g. Haskell) but for most ecosystems (like the Go example above) it ends up being pretty frustrating for one reason or another, due to lacking language features. Once those features are developed, there's a lot of room to make huge improvements in the various lang2nix projects, and then much more of Nix's value will be accessible to developers.
Re: How Nix and NixOS get so close to perfect
#174I’m a Staff Software Engineer in a Fortune 500. I’ve delivered a multitude of complex projects to production. Trying to setup Nix made me feel dumb and incompetent.
So you found a concept that didn’t come naturally to you. If you are as successful at this field as you want us to believe, you would probably have learned by now that all technologies click differently for different people depending on the context they bring in when learning it. I can’t imagine taking myself so seriously that I would write a comment like this. This is an opportunity for self reflection more than a l…
And I love the idea behind it and the programs only available within X directory encapsulation but for me the docs just weren't clear enough when I tried.
I should try again. :-/
Re: How Nix and NixOS get so close to perfect
#175How well do they deal with GPU and less popular targets (e.g. embedded systems)?
{
nixpkgs.config.allowUnfree = true;
services.xserver.videoDrivers = [ "nvidia" ];
}
(see also https://nixos.wiki/wiki/Nvidia)For embedded systems the roads are certainly less traveled. There is decent support for several popular ARM SBCs (https://nixos.wiki/wiki/NixOS_on_ARM), and you can get it onto others with some elbow grease. The official binary cache only provides binaries for aarch64, so you will have to compile everything yourself for 32-bit ARM.
Re: How Nix and NixOS get so close to perfect
#176Earlier quoted context omitted.
I feel differently: when proponents of a thing are open about its flaws, and those flaws are not in the fundamental ideas or principles of that thing, then it makes me more convinced that perhaps the thing does have merit. (Although I can buy the argument that it's not close to "perfect", mostly because I have no idea what perfect package management would look like.)
Maybe having terrible UX is starting to look like a fundamental flaw here? I know that UX sounds like something that should be “polishable”, but at this moment I have been hearing for years about Nix being great in principle but not that great in everyday practice. (Cf. Linux on desktop…)
Re: How Nix and NixOS get so close to perfect
#177Earlier quoted context omitted.
Yes and yet it failed. That's what GP is saying: Guix may well be better, but it is even less popular than Nix and thus at (greater) risk of dying.
I don’t think GUIX will ever die, it seems to be the GNU Foundation’s favorite. It’s the only GNU-approved distro whose website is a sub domain of gnu.org. GNU seems to be unofficially standardizing on GUIX. https://www.gnu.org/distros/free-distros.html https://guix.gnu.org/
Guix is certainly not favoured by those who see themselves as leading the "project".
GNU is hardly even a project in the traditional sense.
Guix on the other hand is.
Re: How Nix and NixOS get so close to perfect
#178As someone who really would like to have something like nix the thing that scares me away every time is the fact that the people creating this aparently did not think a lot about how to onboard users. And I don't mean a lack of documentation — what I mean is that the obvious decisions that have been taken (naming everything "Nix", using Haskell as a base for the syntax, ...) don't really fill me with confidence that…
> Using Haskell as a base for the syntax I don’t really think this is a problem at all? I mean, at the particular design point the language occupies there are basically three possibilities: - Kind of like Lisp (parens everywhere, painful with pervasive currying); - Kind of like ML (var and fun everywhere); - Kind of like Haskell. Nix is chooses the last of those, and it does not have most of Haskell’s funkiness: no “…
This is such a weird thing that keeps coming up. Why would the language have to be lazy? Obviously, there are tons of things that are lazily evaluated in Guix, e.g. the whole package graph. Why would Scheme have to be a lazy-by-default language? It baffles me that this objection keeps ending up on people's lists.
Re: How Nix and NixOS get so close to perfect
#179But the current NixOS approach is terrible for maintainers and developers, there are so many that get burnt out due to the constant churn and lack of regression prevention.
Can you elaborate on churn and regression prevention? Haven’t heard of those issues before, but I’m relatively new to Nix.
https://discourse.nixos.org/t/nixpkgss-current-development-w...
Re: How Nix and NixOS get so close to perfect
#180Earlier quoted context omitted.
>> Programmers have been looking at Haskell for 25 years and rejecting it. > I really don't know why you think that true: Because it doesn't show up any any metric as having significant usage. A list of 100 companies using it doesn't make the hundreds of millions of other companies not using it go away.
Your argumentation is just completely wrong, you think that "significant usage" is some kind of "quality". You try to argue that a hammer and a screwdriver are of significant usage, when i fact the best tool for the job is a scalpel. FWI HN was not written in JavaScript or PHP but you can lookup that for yourself.
Nowhere did I claim that - you're reading things I did not say.
Claiming that something is rejected by everyone does not make any statement on the quality of that thing.
[EDIT: It's kinda common knowledge that Haskell is barely used in industry. I cannot remember coming across a single non-academic programmer in the workplace who actually wanted to use it, other than myself]