Tweag+Nix dev update #35

Hello :wave:t3:

I’m taking over the task of regularly giving news to the community about our company work for improving Nix. I hope to be up to the task after @thufschmitt. He will focus on more Nix work :blush:

Previously in Tweag :eyes:
Next in Tweag

Making Nix solve people’s problems

Docs, docs, docs

Usability studies

@fricklerhandwerk got commit access to the Nix repository. This will be the opportunity to work on improving developer experience by better guiding Nix contributors.

In the continuation of his involvement into documentation team, he worked on nix.dev content:

  • Nix language tutorial #267
  • contribution guide for documentation #261
  • updated list of Nix language tutorials #301
  • reviews of larger contributions #317 #274.

Nix documentation improvements:

  • cleaner display of terminal help pages #6968
  • easier-to-understand rendering of command documentation #6969
  • ensure backwards-compatibility of URLs in the manual #7006
  • more polished outline of the Nix language#6907
  • moved Nix language samples from Nixpkgs to Nix documentation.

An extensive discussion has been concluded to formalize nomenclature for all the Nix components (program, language, package collection …).

In order to guide new contributors to the documentation team, the NixOS website has been updated to increase the team’s visibility.

jupyterWith improvements

@djacu kept working on jupyterWith with @garbas and @jlesquembre. The current focus is on building a new and more resilient version mimicking more closely the upstream behavior (and so preventing a number of issues coming from the slight differences that exist in the current version).

In particular,

jupyterWith will release a new version in the coming weeks. There are a few remaining issues we would like to solve before the merge:

  • There is a bug related to the uniqueness of a kernel name #284.
  • Fixing internal code for filtering available kernels.
  • Updating documentation so it clear and aligns with the current code.
  • Simplifying the kernel factory interface so it is easier for end users.
  • Wrapping the jupyter environment so stateful extensions work properly.

Better error messages

@layus had an old Nix pull-request improving the error reporting for many Nix evaluation errors (Add context to better locate runtime coercions by layus · Pull Request #6204 · NixOS/nix · GitHub).
This PR got a lot of conflicts because it was for the most part changing the same code as the (merged) pull request adding the --debugger flag. So he recently started the painful but necessary rebase on top of master to make it reach a mergeable state.

Improving <search.nixos.org>

@wyill added more meta information to nix flake show’s json output, to make these available for <search.nixos.org>.
This incidentally hit some limitations of the current caching mechanism, which led him to start improving it with @thufschmitt.

Making Nix work reliably everywhere

Improving the installer

@thufschmitt started an effort to improve the installer. This led to a first meeting last Wednesday, you can read the meeting notes on this hackmd

Before that, @mkaito spent a bunch of time trying to reproduce some of the issues with the installer on MacOS

NixOS VMs on Mac

We mentioned some time ago that @YorikSar had a PoC allowing to run NixOS VMs straight from a macOS machine (x86_64 or aarch64).

After a number of improvements, this got merged by @infinisil (nixos/qemu-vm: Allow to build and run VMs on Darwin by YorikSar · Pull Request #180222 · NixOS/nixpkgs · GitHub)

Booting straight from ZFS

@YorikSar, @infinisil and @djacu kept their work towards allowing NixOS to boot straight from a ZFS partition. This recently led to finding a weird EfiFs bug, which turned out to be a kernel issue ("Buffer Too Small" when loading initrd from ext2 partition · Issue #38 · pbatard/efifs · GitHub), which got fixed upstream after being reported. Now, they are hitting an issue with bootctl in systemd (bootctl: Block device node of composite fs partition is invalid · Issue #24616 · systemd/systemd · GitHub).

A new Nix option to limit the download speed

@Solene made her first contribution to Nix in order to add a new option download-speed to limit the download speed when downloading binary packages or sources.

For nixpkgs-unstable users, you can already use it by adding download-speed = 600 to /etc/nix/nix.conf if you want to limit the thottle the speed to 600 kB/s. But you can also use it ad-hoc in a nix command as a parameter, for instance nix shell --download-speed 600. This is a welcomed improvement to keep a stable network for people with a slow Internet access.

Making Nix ubiquitous

Talks and videos

  • @Solene published a video comparing the various existing deployment solutions for NixOS (and presenting her own)

Blog posts

Nickel

  • version 0.2 has been released (and a subsequent 0.2.1 with a minor fix)
  • @yannham fixed the handling of contracts when used as static types (#766), opening the possibilities of implementing type aliases and eliminating of redundant contract applications
  • enum types were officially re-introduced (#780, they were simply disabled due to syntax conflicts in 0.1)
  • @ebresafegaga fixed the handling of polymorphic contracts (#802)
  • @yannham implemented merge priorites (#829, as part of RFC001)
  • @yannham implemented optional fields (#815), although not in a totally satisfying way (see the following item)
  • said optional fields, as well as prior experiments (#710), have shown some weaknesses of the current semantics and implementation of metadata. Thus he also wrote RFC005 to remedy those issues.
  • @fuzzypixelz just finished his internship on performances, but he did not just sit around! He landed lazy array contracts (#809) to avoid undue quadratic performances on arrays, opened array slices #776 to make tail and folds operations quicker, and experimented with random access lists and De Bruijn indices to improve the lookup time of identifiers (#807)
  • @francoiscaddet continued to work on compiling Nix to Nickel, handling the with construct (#826).

Thanks for reading up to there, I hope you find these updates useful :ok_hand:t3: Let’s continue spreading some Nix on more computers :metal:t3:

24 Likes

Note: it seems this post was not published in a forum category, thus it didn’t appear in my notifications (I saw the post almost by mistake).

It should be put in the Development category like previous similar posts. => Everyone watching new posts in this category will properly get a notification.

Thank you for reporting it, it’s indeed a mistake I do on most of my discourse posts :frowning:

It’s fixed :slight_smile:

2 Likes

Congratulation and thanks for keeping us up-to-date.

Great stuff is happening!

2 Likes