# Tweag+Nix dev update #35

**URL:** https://discourse.nixos.org/t/tweag-nix-dev-update-35/21701
**Category:** Development
**Created:** [September 15, 2022, 9:01am UTC](https://discourse.nixos.org/t/tweag-nix-dev-update-35/21701 "2022-09-15T09:01:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [September 15, 2022, 9:01am UTC](https://discourse.nixos.org/t/tweag-nix-dev-update-35/21701/1 "2022-09-15T09:01:25Z")

</div>

Hello 👋🏼

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 😊

[Previously in Tweag 👀](https://discourse.nixos.org/t/tweag-nix-dev-update-34/20901)  
[Next in Tweag](https://discourse.nixos.org/t/tweag-nix-dev-update-36/22120)

# 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](https://discourse.nixos.org/t/improving-developer-experience/21629) by better guiding Nix contributors.

In the continuation of his involvement into documentation team, he worked on [nix.dev](https://nix.dev) content:

- Nix language tutorial [#267](https://github.com/NixOS/nix.dev/pull/267)
- contribution guide for documentation [#261](https://github.com/NixOS/nix.dev/pull/261)
- updated list of Nix language tutorials [#301](https://github.com/NixOS/nix.dev/pull/301)
- reviews of larger contributions [#317](https://github.com/NixOS/nix.dev/pull/317)[#274](https://github.com/NixOS/nix.dev/pull/274).

Nix documentation improvements:

- cleaner display of terminal help pages [#6968](https://github.com/NixOS/nix/pull/6968)
- easier-to-understand rendering of command documentation [#6969](https://github.com/NixOS/nix/pull/6969)
- ensure backwards-compatibility of URLs in the manual [#7006](https://github.com/NixOS/nix/pull/7006)
- more polished outline of the Nix language[#6907](https://github.com/NixOS/nix/pull/6907)
- moved Nix language samples [from Nixpkgs](https://github.com/NixOS/nixpkgs/pull/186764) to [Nix documentation](https://github.com/NixOS/nix/pull/6906).

An [extensive discussion](https://github.com/NixOS/nix.dev/issues/275) has been concluded to [formalize nomenclature](https://github.com/NixOS/nix.dev/pull/263) 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](https://github.com/NixOS/nixos-homepage/pull/875) to increase the team’s visibility.

## `jupyterWith` improvements

@djacu kept working on [jupyterWith](https://github.com/tweag/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,

- @djacu added a number of new kernels ([Typescript](https://github.com/tweag/jupyterWith/pull/259), [elm](https://github.com/tweag/jupyterWith/pull/256), [julia](https://github.com/tweag/jupyterWith/pull/252), [cpp](https://github.com/tweag/jupyterWith/pull/251), [ocaml](https://github.com/tweag/jupyterWith/pull/248), [ruby](https://github.com/tweag/jupyterWith/pull/242), [postgresql](https://github.com/tweag/jupyterWith/pull/258))
- As a side-effect of all these additions, @djacu encountered an interesting bug when trying to override a kernel, which turned out to be a consequence of an undocumented behavior of the jupyter kernel specification ([Using extraPackages override in template does not provide those packages in the python/jupyter environment. · Issue #284 · tweag/jupyenv · GitHub](https://github.com/tweag/jupyterWith/issues/284))
- @djacu made it possible to install jupyter extensions ([Add nodejs and npm to jupyterlab instance runtime packages. by djacu · Pull Request #273 · tweag/jupyenv · GitHub](https://github.com/tweag/jupyterWith/pull/273))
- @jlesquembre added a number of `testbook` tests to the repository to ensure that the kernels work properly ([Add testbook tests by jlesquembre · Pull Request #277 · tweag/jupyenv · GitHub](https://github.com/tweag/jupyterWith/pull/277))

`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](https://github.com/tweag/jupyterWith/issues/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 ([https://github.com/NixOS/nix/pull/6204](https://github.com/NixOS/nix/pull/6204)).  
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](http://search.nixos.org)\>

@wyill [added more meta information to `nix flake show`’s json output](https://github.com/NixOS/nix/pull/6828), to make these available for \<[search.nixos.org](http://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](https://discourse.nixos.org/t/nix-installer-workgroup/21495). This led to a first meeting last Wednesday, you can read the meeting notes [on this hackmd](https://hackmd.io/YFE-fZGKQkGPD5I63BnX3A)

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](https://github.com/NixOS/nixpkgs/pull/180222))

## 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](https://github.com/pbatard/efifs/issues/38)), 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](https://github.com/systemd/systemd/issues/24616)).

## A new Nix option to limit the download speed

@Solene made her [first contribution to Nix](https://github.com/NixOS/nix/pull/6926) 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)

[![](https://i.ytimg.com/vi/KOGmAsWzzc8/hqdefault.jpg?sqp=-oaymwEmCOADEOgC8quKqQMa8AEB-AH-CIAC0AWKAgwIABABGB0gXShyMA8=&rs=AOn4CLB2wqrOx3KILP9dpbvtfmNSkT75dQ "A journey into the world of NixOS deployment tools") ](https://www.youtube.com/watch?v=KOGmAsWzzc8)

- Several of us also proposed various talks for the coming NixCon (still waiting for an answer)

- @mat and @bjth hosted [yet more great presentations](https://www.youtube.com/playlist?list=PLt4-_lkyRrOMWyp5G-m_d1wtTcbBaOxZk) for the Summer of Nix

## Blog posts

- @eloi.wang wrote a [blog post](https://www.tweag.io/blog/2022-09-13-nixpkgs-graph/) to present his intership project [nixpkgs-graph](https://github.com/tweag/nixpkgs-graph/), a program to visualize nixpkgs graph using modern tools.

- @djacu wrote a [blog post](https://www.tweag.io/blog/2022-09-01-unit-test-your-nix-code/) presenting [Nixt](https://github.com/nix-community/nixt), a Nix unit-test framework

- @Solene wrote [another post](https://www.tweag.io/blog/2022-08-18-nixos-specialisations/) presenting the [NixOS specializations](https://nixos.org/manual/nixos/stable/options.html#opt-specialisation), a cool but rather unknown feature of the OS

# Nickel

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

* * *

Thanks for reading up to there, I hope you find these updates useful 👌🏼 Let’s continue spreading some Nix on more computers 🤘🏼

---

<div class="post-metadata">

### Author: ![bew](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bew/32/2091_2.png) [@bew](https://discourse.nixos.org/u/bew)
#### Post date: [September 16, 2022, 8:38am UTC](https://discourse.nixos.org/t/tweag-nix-dev-update-35/21701/2 "2022-09-16T08:38:42Z")

</div>

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](https://discourse.nixos.org/c/dev/14) category like previous similar posts. =\> Everyone watching new posts in this category will properly get a notification.

---

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [September 16, 2022, 8:57am UTC](https://discourse.nixos.org/t/tweag-nix-dev-update-35/21701/3 "2022-09-16T08:57:37Z")

</div>

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

It’s fixed 🙂

---

<div class="post-metadata">

### Author: ![davidak](https://discourse.nixos.org/user_avatar/discourse.nixos.org/davidak/32/49_2.png) [@davidak](https://discourse.nixos.org/u/davidak)
#### Post date: [September 16, 2022, 11:57am UTC](https://discourse.nixos.org/t/tweag-nix-dev-update-35/21701/4 "2022-09-16T11:57:30Z")

</div>

> [@Solene](#):
>
> @Solene made her [first contribution to Nix](https://github.com/NixOS/nix/pull/6926)

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

Great stuff is happening!
