The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty...

28
The Nix Project: Past, Present, Future Eelco Dolstra 14 November 2015

Transcript of The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty...

Page 1: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

The Nix Project: Past, Present, Future

Eelco Dolstra

14 November 2015

Page 2: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Welcome to NixCon 2015!

Page 3: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

A big thank you to the organisers!

Rok Garbas

Paulus Esterhazy

Peter Simons

Page 4: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

And a big thank you to the sponsors

Page 5: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

What has been going on?

Page 6: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Nixpkgs committers per month

Page 7: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Nixpkgs commits per day

Page 8: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Nixpkgs size

Page 9: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Binary cache traffic

Page 10: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Binary cache users

Page 11: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

GitHub

8246 closed PRs, 291 open

1673 closed issues,771 open

Page 12: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

NixOS releases

14.12 “Caterpillar”

15.09 “Dingo”

Zillions of new packages, services

Page 13: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Modular Tex Live packaging!

with import <nixpkgs> {};

texFunctions.runLaTeX {

rootFile = ./doc.ltx;

texPackages = {

inherit (pkgs.texlive)

scheme-basic pgf beamer ms soul ec

textpos metafont helvetic times listings;

};

}

Page 14: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Nix releases

1.8, 1.9, 1.10

Signed binary cachesAutomatic downloading of Nix expressions

I nix-env -f https://github.com/NixOS/nixpkgs-channels/archive/8a3e....tar.gz -i firefox

Mac OS X sandbox support

Page 15: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Hydra improvements

Nixpkgs/NixOS continuous builds are a major bottleneck

New Hydra queue runner schedules builds more efficiently

Hydra provisioner fires up EC2 spot instances to do builds

More improvements on the way

Page 16: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

NixOS Foundation

Non-profit org to support NixOS and related projectsPrimarily intended to handle donations for

I Hydra hardwareI AWS costsI ConferencesI ...

Page 17: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Roadmap

Page 18: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Disclaimer: Roadmaps are fiction

Page 19: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Nix Future Work (2006)

A fully Nixified system (yes)

The intensional model (no)

A language for builders (no)

A type system (no)

Efficient storage (no)

Blacklisting (no)

Upgrading in the intensional model (sort of)

Feature selection and automatic instantiation (eh...)

Page 20: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Nix Roadmap

Nix 2.0I New command line interfaceI Distributed binary cache

Nix 3.0I Content-addressed Nix store

Page 21: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

New command line

Nix command line interface is pretty cruftyI Lots of commands, inconsistent behaviourI Old suboptimal design choices, like nix-env using package

names (slow) rather than attribute namesI Nixpkgs options not exposedI nix-env only does imperative package management

Solution: Replace by a single git-style command

Page 22: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

New command line (cont’d)

nix install, nix gc, nix shell, ...

Based on attribute names: nix install xorg.xmessage

Maybe do caching of nix search

Maybe support declarative style: nix rebuild

Maybe deprecate channels —NIX PATH=nixpkgs=http:// is enough

Page 23: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Nixpkgs discoverability

nix query should show available package options

Requires new package formalism

firefox = mkPackage

{ enableBranding ? false

, enablePulseaudio ? true

, ... }:

...

Page 24: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Distributed binary cache

Download binary only when it has at least N signatures

Requires greater build determinism

Page 25: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Content-addressed Nix store

Packages stored in /nix/store/HASH where HASH =hash(contents)

A.k.a intensional model

Allows any user to install packages (using any binary cache)

Also requires greater build determinism

Page 26: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

NixOS Roadmap

Closure size reduction

Improved container support

Systemd update, GCC 5, ...

Page 27: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Closure size reduction

NixOS system closures are too big

$ du -sch $(nix-store -qR /run/current-system)

3.3G total

Bad for containers, cloud deployments

Solution: multiple outputs — move stuff like headers, docs intoseparate store paths that can be downloaded/GCed separately

Has been on-going for quite a while

Page 28: The Nix Project: Past, Present, Future · New command line Nix command line interface is pretty crufty I Lots of commands, inconsistent behaviour I Old suboptimal design choices,

Hydra improvements

Upload build results directly to binary cache

Removes dependency on disk of central Hydra machine (whichhas only 3 TB)

Will need more Mac OS X builders