Live data from Hacker News

NixOS Linux

nixos.org

11–20 of 82 posts

Re: NixOS Linux

#11
post #2

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

It could, depending on your use case, but normally all packages from nixpkgs share the same libcurl, so when libcurl is updated, all packages that depend on it will also be updated.

The old libcurl will still exist on your system to allow you to rollback to previous states of your system, but you can always run nix-collect-garbage if you want to free up disk space.

This is similar to the situation in Arch Linux where pacman keeps all downloaded packages, and you have to run paccache if you want to free space.

Re: NixOS Linux

#12
post #6
post #2

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

If any of software relies on different versions, yes. It beats not being able to use something because you can only have one version of a library shared.

I understand, thanks. It wasn't a criticism, I honestly asked out of ignorance.

Re: NixOS Linux

#13

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.

Has the container situation improved? Last time I looked (quite some time ago) I couldn’t find an official or community blessed container to base anything on.

Re: NixOS Linux

#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 these tools are all language-specific and have their own limitations (especially around native libraries and dependencies written in other languages).

nix-shell gives me the equivalent of virtualenv that works for everything. I can have a single sandboxed environment even if my project uses a bunch of different languages and I can manage everything in a reproducible, low-overhead fashion. No more worrying about making a mess by installing tools or packages globally.

Then, once I got really used to that, I spent some time setting up direnv[1] and lorri[2]—both of which are themselves managed with Nix, of course!—so that my environment gets automatically configured as soon as I enter a project directory without needing to call nix-shell explicitly. To be honest, the experience is still a bit rough, but it works well enough day-to-day that I have my reproducible sandbox cake and eat it in an mostly frictionless way too :).

[1]: https://direnv.net/

[2]: https://github.com/target/lorri

Re: NixOS Linux

#15
post #6
post #2

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

If any of software relies on different versions, yes. It beats not being able to use something because you can only have one version of a library shared.

How does this work with compiling software. For example, I routinely compile programs that use different versions of openssl. Does NixOS make this process any easier.

Re: NixOS Linux

#18

I use Void now and like not having systemd. Can I install Nix on my Void? Do I then just stop using the native package manager? Or would it be better to install NixOS? Could I then choose not to use systemd? Would that be hard? Is the idea that you can define your system in a file and reproduce it more or less automatically? How does this compare to Guix?

NixOS uses systemd pretty heavily under the hood. You configure systemd services in the Nix language as part of your system config. It's quite nice.

Re: NixOS Linux

#19
post #6

Earlier quoted context omitted.

If any of software relies on different versions, yes. It beats not being able to use something because you can only have one version of a library shared.

How does this work with compiling software. For example, I routinely compile programs that use different versions of openssl. Does NixOS make this process any easier.

Yes that's one of the greatest things about nix. You can have 100 pieces of software installed that all use a different curl version without issues. You can also develop 100 piece of software/compile that all use a different curl version at once.

Re: NixOS Linux

#20
Related - I've been using home-manager on MacOS, WSL2 and NixOS. Very nice to have a single, small file to manage my dot configs and CLI tools on various platforms
Post reply on HN