Live data from Hacker News

How Nix and NixOS get so close to perfect

christine.website

21–30 of 183 posts

Re: How Nix and NixOS get so close to perfect

#21
post #16

It's kinda ironic, the biggest innovation in package management and OS design is basically unusable for the average tech person. Compared to Nix, every other package manager is a security liability.

Compared to Nix, every other package manager is a security liability. Nix is great, but I don't see much difference with respect to security. In fact, Nix encourages and flakes formalize pinning of nixpkgs versions. I am sure that there are a bazillion repositories/configurations out there that use a pinned nixpkgs version with known vulnerabilities in glibc, libxml, or whatever. Besides that, packages in nixpkgs oft…

"packages in nixpkgs often have known vulnerabilities for months"

Garbage in, garbage out.

It would be nice if Nix could make vulns go away entirely, but you can't keep people from creating buggy packages.

Re: How Nix and NixOS get so close to perfect

#22
I don't think it's very perfect at all. It clearly appeals strongly to people managing cloud servers because it's basically the same kind of technology as Ansible or the many alternatives. Makes sense to use the same kind of tech you know through and through on your desktop as well.

To me personally it doesn't really have much appeal.. Being able to replicate my desktop from scratch is not something I need often. And when I need to make a config change I don't want to bundle that with a package upgrade.

Even for my servers I don't subscribe to the "cattle not pets" ideology.

I just mean to say it's close to perfect for its target userbase. But different ones exist and this seems to often be forgotten by Nix evangelists. It's a good tool for some jobs but not for all.

Re: How Nix and NixOS get so close to perfect

#23
What is the Nix approach to config files?

I understand it allows for stable binaries, without dependency hell, easily installable, possibly multiple versions of the same package; and for easy rollback of the installations. Because code modules are versioned by hashes of their full dependency tree and build options.

But configuration files?

I once installed the Nix package manager on my Ubuntu, and installed some apps with it. Nothing worked. Because some files I have in /etc/ were not compatible with Nix versions of the applications. Those configs were about some deep mechanics of X-related libraries. I never edited them and I don't understand their function.

So, it was impossible to use Nix packages side by side with my Ubuntu. And I suspect the same can happen on plain Nix OS with multiple versions of one package.

Probably I am missing something, but that does not look perfect.

Re: How Nix and NixOS get so close to perfect

#24

I don't think it's very perfect at all. It clearly appeals strongly to people managing cloud servers because it's basically the same kind of technology as Ansible or the many alternatives. Makes sense to use the same kind of tech you know through and through on your desktop as well. To me personally it doesn't really have much appeal.. Being able to replicate my desktop from scratch is not something I need often. And…

I probably appeals most to developers as sharing application development environments with shell nix files is totally awesome.

I must say that using nix on my primary workstation makes it feel like an appliance. The system generation roll-back have saved me a lot of times when an application update brings a regression.

Re: How Nix and NixOS get so close to perfect

#26
post #12

Earlier 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…

[deleted]

Re: How Nix and NixOS get so close to perfect

#27

What is the Nix approach to config files? I understand it allows for stable binaries, without dependency hell, easily installable, possibly multiple versions of the same package; and for easy rollback of the installations. Because code modules are versioned by hashes of their full dependency tree and build options. But configuration files? I once installed the Nix package manager on my Ubuntu, and installed some apps…

Configuration of applications are usually exposed as properties by package maintainers. What I like about nix is the complete ”as code” approach - I usually look in the the package repo for the properties. A couple of times I’ve had to escape hatch and write to a config file using a nix expression.

Re: How Nix and NixOS get so close to perfect

#28
Two years ago I tried to set up my home-webserver with nixOS. I failed miserably.

The post hits the nail on the head: The documentation is horrible, and barely differentiates between the language, the package manager and the OS itself.

I really like the idea behind nix; maybe something with better execution comes up one day :)

Re: How Nix and NixOS get so close to perfect

#29

I don't think it's very perfect at all. It clearly appeals strongly to people managing cloud servers because it's basically the same kind of technology as Ansible or the many alternatives. Makes sense to use the same kind of tech you know through and through on your desktop as well. To me personally it doesn't really have much appeal.. Being able to replicate my desktop from scratch is not something I need often. And…

I probably appeals most to developers as sharing application development environments with shell nix files is totally awesome. I must say that using nix on my primary workstation makes it feel like an appliance. The system generation roll-back have saved me a lot of times when an application update brings a regression.

That makes sense, I never need to share my config with anyone else.

Also I love the ability to mix packages with source compiled software, which is one of the reasons I use FreeBSD on my primary desktop. It does that combo really well with its ports collection.

Re: How Nix and NixOS get so close to perfect

#30

What is the Nix approach to config files? I understand it allows for stable binaries, without dependency hell, easily installable, possibly multiple versions of the same package; and for easy rollback of the installations. Because code modules are versioned by hashes of their full dependency tree and build options. But configuration files? I once installed the Nix package manager on my Ubuntu, and installed some apps…

I know of least three approaches:

1. For per-user configuration there is home-manager which symlinks dotfiles to Nix store based on a single "home.nix" derivation (state). Home-manager is usable outside of NixOS and, in my opinion, it is better than most dotfiles managers. https://github.com/nix-community/home-manager

2. In NixOS /etc is composed in the same way from the system derivation.

3. Outside of NixOS, I think, one can build systemd units which refer directly to configuration files in Nix store. Probably one can add config paths into wrappers, but it will be very fragile and won't scale.

Post reply on HN