Live data from Hacker News

Reflections on NixOS

zenhack.net

41–50 of 102 posts

Re: Reflections on NixOS

#41
post #32
post #28

Earlier quoted context omitted.

Why do you believe it makes Unix a single user machine??? I'm not aware of any reason for such statement, can you elaborate?

I think I should have been clear. It does not make Unix single user machine but it is more useful for cases where a single user is the main user of a machine like the laptop user. My reasoning was very simple. Nixos makes it easy to install packages on a per user basis. This would mean there is a lot of redundancy if another user also needs the same package. A snapshot/dedup filesystem will easily solve the problem.

Multi-user Nix systems use a "nix daemon", which user's commands send requests to ("please build this version of Firefox with this version of GCC, etc."); all of the results go in the main "nix store" (usually /nix/store).

Nix doesn't store duplicates; a hash is calculated, based on the inputs (source code, compilers, libraries, etc.) and if an output with that hash already exists, it will be used. If not, the configured binary caches will be queried, to see if a pre-built binary can be downloaded. If not, the inputs are fetched (following the same process) and the build is performed.

Re: Reflections on NixOS

#42
funnily enough I tried the same sort of switcheroo a few weeks ago as well and just ran into too many issues for it to be useful for me at the moment as well. I tried to contribute back fixes for the the problems I ran into, but just couldn't figure out how to fix all the problems I had with the way things were being done :( PostGIS and a few Gnome 3 desktop issues basically drove me back to Arch where stuff just works.

I'm sure I'll try nix again, and again, until maybe one day it just works as well. I really do love the features it brings not just on paper but in practice.

Re: Reflections on NixOS

#43

Correct me if I'm wrong but isn't the better solution to this containerization? The application will in a literal sense own the system. You also get inherent security (unless someone figures out how to escape their vm). I member someone had a website talking about this. The use of a file system with revision tracking, containerization for security, and sending files between VMs to make things work.

Containers are but one type of virtualization. What manages the host machine running the container? Nix (and Guix, the project I work on) can be used for everything: bare metal, virtual machine, container. Furthermore, the packaging strategy also allows for granular virtualization of environments. Sometimes all you need is to set a few environment variables ($PATH and such) to point at a specific set of software, and this is made easy because Nix doesn't use a global /usr directory and has a notion of "profiles" that allow you to pick and choose the software you'd like for any given project. If all you have is containers, everything looks like a crate.

Re: Reflections on NixOS

#44
post #16

I use NixOS since last spring and I adore it so much that I almost credit it with making me like computers again. It's a kind of bumpy ride sometimes but for me there's no other distribution that's even close. Packaging the Nix way does require patching upstream and that's probably inevitable. It would be nice to help with the documentation situation, though I'd note that the NixOS manual and the Nixpkgs manual are s…

GuixSD is close. It's the internal DSL (using Guile Scheme as host) version of Nix (which is an external DSL).

Both have their own advantages. For example, I really like some of the reproducible binary efforts Guix has made [1].

And I prefer the way Guix packages some things. In Nix, I often found installing a seemingly innocent piece of software like mutt ended up installing python (!) by pulling all possible dependencies of mutt (like gpg), and in turn pulling all possible dependencies of gpg, which brought some X11 bindings and finally python.

But Nix has some amazing stuff like NixOps. And it might be more mature. I know some corps like Logicblox use it for their deployments.

[1] https://www.gnu.org/software/guix/manual/html_node/Invoking-...

Re: Reflections on NixOS

#45
post #16

I use NixOS since last spring and I adore it so much that I almost credit it with making me like computers again. It's a kind of bumpy ride sometimes but for me there's no other distribution that's even close. Packaging the Nix way does require patching upstream and that's probably inevitable. It would be nice to help with the documentation situation, though I'd note that the NixOS manual and the Nixpkgs manual are s…

> Packaging the Nix way does require patching upstream and that's probably inevitable.

Not to familiar with Nix, can you explain why? Anything that can't be handled simply by applying small patches to the upstream during packaging?

Re: Reflections on NixOS

#46
post #38
post #32

Earlier quoted context omitted.

I think I should have been clear. It does not make Unix single user machine but it is more useful for cases where a single user is the main user of a machine like the laptop user. My reasoning was very simple. Nixos makes it easy to install packages on a per user basis. This would mean there is a lot of redundancy if another user also needs the same package. A snapshot/dedup filesystem will easily solve the problem.

Nix profiles link to the same global store, so user packages are not duplicated.

Thanks.

Re: Reflections on NixOS

#47
post #39
post #22

Earlier quoted context omitted.

http://www.weirdnet.nl/apple/rename.html Yes, I know it is fixed. But who knows what one runs into! And this: http://blog.moertel.com/posts/2005-08-22-how-to-change-symli...

Well, are there any advanced filesystems that provide better functionality and which work on Linux and OS X? Or what would be the alternative?

btrfs perhaps? or zfs?

Re: Reflections on NixOS

#48
post #32

Earlier quoted context omitted.

I think I should have been clear. It does not make Unix single user machine but it is more useful for cases where a single user is the main user of a machine like the laptop user. My reasoning was very simple. Nixos makes it easy to install packages on a per user basis. This would mean there is a lot of redundancy if another user also needs the same package. A snapshot/dedup filesystem will easily solve the problem.

Multi-user Nix systems use a "nix daemon", which user's commands send requests to ("please build this version of Firefox with this version of GCC, etc."); all of the results go in the main "nix store" (usually /nix/store). Nix doesn't store duplicates; a hash is calculated, based on the inputs (source code, compilers, libraries, etc.) and if an output with that hash already exists, it will be used. If not, the config…

Thanks for educating me. I was totally mistaken. Thanks.

Re: Reflections on NixOS

#49
post #32

Earlier quoted context omitted.

I think I should have been clear. It does not make Unix single user machine but it is more useful for cases where a single user is the main user of a machine like the laptop user. My reasoning was very simple. Nixos makes it easy to install packages on a per user basis. This would mean there is a lot of redundancy if another user also needs the same package. A snapshot/dedup filesystem will easily solve the problem.

When a user installs a package, it goes into the system-global package store, and the user's symlinks are updated. When a second user installs the same package, they just get a symlink to the original. There isn't any duplication.

Thank you.

Re: Reflections on NixOS

#50
post #17

I used nixos for a few weeks and then went back to Debian. * I share the concern of the author on symlinks farm. It is scary! I would like it to be dealt with in the filesystem layer (Plan 9 had a snapshot based filesystem - fossil - years ago). Symlinks have all sorts of weird semantics on different Unix machines. * Another of my gripe with nixos is that it makes Unix, a single user machine! Sure, packages need not…

Regarding licenses, most (all?) packages in the official nixpkgs repo have license metadata, and you can set your configuration to forbid/allow proprietary packages (the "allowUnfree" option), or use a whitelist (e.g. forbid everything except Flash).

Guix is a GNU project, and doesn't allow proprietary packages in their collection at all.

Post reply on HN