News for hackers. Stuff that matters.
Re:Tvix: We Are Rewriting Nix by pxc on Thursday December 02, 2021 @11:54AM (#29418711)
Nix 2.4 is totally compatible with NixOS. It was held back from default status on the latest NixOS release because it includes a few behavior changes to the CLI that have been jarring for some users. It's to ease the transition for them, not because it's broken or something like that.

You can set up Nix 2.4 on NixOS 21.11 by adding

  nix.package = pkgs.nix_2_4;
in your configuration.nix :)

I like the new CLI, too, and it's worth trying if you want to see what all is new in Nix. Here's how to enable flakes on NixOS, if you have Nix 2.4:

  nix.extraOptions = ''
    experimental-features = nix-command flakes
  '';
Re:Tvix: We Are Rewriting Nix by southerntofu on Friday December 03, 2021 @07:54AM (#29429439)
Thanks for the information! I've heard about flakes but i failed to understand the usefulness of them... from what i gather it's a very heated topic in the nix community which seems to be splitting the ecosystem. Can you recommend in-depth resources about the pros and cons of both approaches from a critical perspective?
Re:Tvix: We Are Rewriting Nix by pxc on Friday December 03, 2021 @03:35PM (#29435032)
There are some technical objections to the design of flakes, but the controversy in the community is primarily social imo.

The reading I'd recommend as someone sympathetic to both 'sides' isn't really a technical comparison, but this: https://grahamc.com/blog/flakes-are-an-obviously-good-thing

As far as technical pros and cons, it's worth looking at colemickens' PoC demonstrating that in principle, you can use Nix to generate literally identical output with and without flakes: https://github.com/colemickens/nixos-flake-example

> Both approaches

it's also worth noting that prior to flakes, there was no single alternative approach to the main problems flakes aims to solve. There were (and are) a whole bunch of competing and bespoke practices for pinning nixpkgs and other Nix sources. You can take a look at niv and nix-thunk to get a sense of them if you want