News for hackers. Stuff that matters.
Re:What Is Nix? by l3s2d on Wednesday May 20, 2020 @05:38PM (#23252115)
Not a Nix user, but my understanding is that it's a standalone package manager with its own repositories. On a non-Nix distro, installing a package with Nix is akin to installing a Python module with pip, instead of the distro's package manager. It would not be managed at all by the distro's package manager. On NixOS, Nix is the distro's package manager.
Re:What Is Nix? by mehrdadn on Wednesday May 20, 2020 @05:44PM (#23252226)
Thanks, but I already got that much. It doesn't answer my question though. If Ubuntu has made a modification to a package (that's basically the entire point of most distros, otherwise they'd be Arch), should I expect those changes in whatever Nix installs?

It also leaves so many other questions unanswered, like what happens if I install GRUB or a new kernel or something else that's supposed to modify the system globally... but that's secondary.

Re:What Is Nix? by ymse on Wednesday May 20, 2020 @06:50PM (#23252923)
Nix packages can not modify the system globally, by design. Not even on NixOS. This is why Nix allows unprivileged users to install anything.

When you install a package with Nix, all you are doing is drop a symlink in your ~/.nix-profile pointing to some /nix/store/<unique-identifier> item.

When you build a package with Nix (also does not require root privileges), it happens inside a container that can only write to /nix/store/<unique-identifier>.

The <unique-identifier> is a cryptographic hash based on all the inputs (dependencies) to the package (also /nix/store/<hash> items) as well as the build script.

Re:What Is Nix? by mehrdadn on Wednesday May 20, 2020 @07:03PM (#23253038)
This is a really good explanation, thank you!
Re:What Is Nix? by solarkraft on Wednesday May 20, 2020 @05:47PM (#23252279)
NixOS only has nixpkgs modifications, not Ubuntu's, as much as Fedora doesn't have Ubuntu's modifications. My understanding is that packages available for Nix are patched to work within its context, but otherwise kept as original as possible, with optional configuration switches.
Re:What Is Nix? by Fnoord on Wednesday May 20, 2020 @05:55PM (#23252379)
The documentation [1] mentions the possible configuration flags for a package, including Grub (which is not the default bootloader, btw).

[1] https://nixos.org/learn.html

Re:What Is Nix? by catern on Wednesday May 20, 2020 @05:49PM (#23252295)
No, you should not expect Ubuntu's modifications in packages installed through Nix.

Things like GRUB or the kernel version are handled at the level of NixOS, because, as you say, they affect the system globally.