Live data from Hacker News

NixOS Linux

nixos.org

51–60 of 82 posts

Re: NixOS Linux

#51
NixOS and the nix package manager are revolutionary OS tools, hampered by a convoluted, undocumented language and library (itself called Nix).

Despite this, I think it's totally worth going through the pain of learning Nix to use NixOS. There is nothing else like it. I imagine other OS's will try to copy and borrow the ideas, in fact they are already doing this (see all the half baked immutable OS stuff out there...), but nothing is as good as NixOS at the moment.

Note: A notable exception is GNU Guix, which is another excellent OS/package manager that is very similar to Nix, with the far more approachable Guile (scheme based). Unfortunately the ecosystem is just not large enough to be usable for practical purposes - also it's hampered by the usual aversion to non-free software.

Re: NixOS Linux

#52

I played with NixOS and am willing to admit that it was too difficult. It's probably great for devops, but it's just slightly too rigid for my own personal use. Let me give an example: let's say you want to use xmonad on top of Plasma. NixOS doesn't have any simple way to configure that. You have the mutually exclusive options for one or the other, basically. I know Nix is powerful enough to do this, if I wanted to g…

> it's just slightly too rigid for my own personal use.

I get what you're saying, but the reality is the opposite. Nix is _far_ more powerful and flexible than anything you can do in Arch. It sounds to me like you just wanted a particular packages available, and Nix didn't have that. But if you have the inclination to learn Nix, you will be able to customize your system, in a safe and repeatable, declarative approach, far more than you could ever do with Arch.

Re: NixOS Linux

#53
I wonder if it's leaking into other distros.

Just like proglangs got destructuring and lambdas gradually.. maybe OSes are influenced by nix.

Re: NixOS Linux

#54

I wonder if it's leaking into other distros. Just like proglangs got destructuring and lambdas gradually.. maybe OSes are influenced by nix.

Oh definitely. The whole concept of immutable OS management - this stuff all comes from NixOS's influence. You see it in Silverblue for example, and other mainstream distros. They are a pale imitation but the influence is there.

Re: NixOS Linux

#55
post #14

I tried to use nixOS as a desktop system. Using a special command (nix-shell) whenever I needed to do development things (e.g. Rust builds) was not my idea of fun. Some other things, like overriding GDM's monitors.xml file, were pretty much impossible to do. Maybe it's better if you just use it as a base for servers / containers.

> Using a special command (nix-shell) whenever I needed to do development things (e.g. Rust builds) was not my idea of fun. Funny you should mention that, because that's exactly what got me using Nix everywhere :). I've always hated installing tools and libraries globally—what if I need a different version for a future project?—so I like tools that sandbox as much as possible like virtualenv, cargo, cabal... etc. But…

Exactly. direnv/lorri basically solves the per-language virtualenv nonsense, but universally for anything. I use chezmoi to manage my shell.nix for various directories. That way every project can manage its system libraries independently. Once you get used to it, it's truly amazing. So much so, I almost think the future trend, once enough people become enlightened, will be checking in shell.nix as standard for development projects.

Re: NixOS Linux

#56
post #2

Just to see if I understand, does this mean you might end up having dozens of libcurls?

Not repeating the others: If a package does end up using multiple version of the same lib, nixos can even deduplicate it somewhat, by symlinking one’s documentations to the other’s.

Re: NixOS Linux

#57
I enjoyed learning the difference between NixOS, nix (eg, nix-build, nix-env,...) Nix Language, and nixpkgs.

Knowing the difference of tools in the belt is like knowing the blades themselves. You can always make your own tools.

If I can't package something with nix, then I call it "metal"

Re: NixOS Linux

#58

I played with NixOS and am willing to admit that it was too difficult. It's probably great for devops, but it's just slightly too rigid for my own personal use. Let me give an example: let's say you want to use xmonad on top of Plasma. NixOS doesn't have any simple way to configure that. You have the mutually exclusive options for one or the other, basically. I know Nix is powerful enough to do this, if I wanted to g…

[deleted]

Re: NixOS Linux

#59
post #54

I wonder if it's leaking into other distros. Just like proglangs got destructuring and lambdas gradually.. maybe OSes are influenced by nix.

Oh definitely. The whole concept of immutable OS management - this stuff all comes from NixOS's influence. You see it in Silverblue for example, and other mainstream distros. They are a pale imitation but the influence is there.

There's also the reproducible build effort, which is somehow more parallel to nix, or cross pollinating than influenced.. but same spirit (and great work by lunar and his friends)

Re: NixOS Linux

#60
post #45

Before installing NixOS, I’d recommend anyone on Linux to give home-manager a go first for the userspace declarative approach with Nix. After a year with full-time NixOS, I switched back to Ubuntu + home-manager as best of both worlds—declarative when feasible, imperative when convenient. [1] https://github.com/nix-community/home-manager

I had the same experience as well. I tried NixOS once as my main desktop environment. I encountered two problems that made me switch to Ubuntu+Nix. And they work perfectly for their own purposes.

One problem is dynamically linked binaries, where the library points to a global position (like /usr/lib). In NixOS, different builds can depend on different versions of the same binary, so there is no single global location. This is not necessarily a bad thing in itself. And normal cases can be fixed with the patchelf [^1] utility. I couldn't make it work with a Z3 binary, so I finally gave up.

The other problem is when I tried to configure jackdbus. There's only one example [^2] configuration. It is marked as outdated by the wiki, and indeed none of the settings work for me.

Then I realized these two are not problems that Nix tries to solve. Pointing to a global binary is okay for some quick fixes. And JACK module is better to work out-of-the-box, I don't want to dive into all of the configurations before I haven't even used it.

Now I use Ubuntu for casual desktop applications and write Nix derivations for projects that need reproducibility. And I think I find my perfect balance.

[^1]: https://github.com/NixOS/patchelf [^2]: https://nixos.wiki/wiki/JACK

Post reply on HN