friendlier

for beginners

#nixcon

Rok Garbas, @garbas

make Nix

friendlier ???

First Contact

Installing

Tooling

Documentation

Contributing

First Contact

https://nixos.org

Installing

curl https://nixos.org/nix/install | sh

nixos-install should work without internet connection

Installing / 2

Bundling a stand-alone executable

$ mkdir nix
$ cat > nix/__main__.py << EOL

def main():
  # TODO: do what https://nixos.org/nix/install bash script does !!!
  print "Nix installed! We love you!"

if __name__ == '__main__':
  main()

EOL

$ wget http://url/to/nix.atr.gz
$ mv nix.tar.gz nix/

$ cd nix  &&  zip -r ../nix.zip *  &&  cd ..
$ echo '#!/usr/bin/env python' | cat - nix.zip > nix-installer
$ chmod +x nix-installer

$ ./nix-installer
Nix installed! We love you!

Tooling

nix-env -i <pkg>

nix-env -iA <pkg>

nix install <pkg>

npm install <pkg>

brew install <pkg>

nix-env -e <pkg>

nix uninstall <pkg>

npm uninstall <pkg>

brew uninstall <pkg>

Tooling / 2

nix-env -qa \* | grep <pkg>

nix search <pkg>

npm search <pkg>

brew search <pkg>

nix-env -qi \* | grep <pkg>

nix list <pkg>

npm list <pkg>

brew list <pkg>

Tooling / 3

nix-env -u <pkg>

nix-env -uA <pkg>

nix upgrade <pkg>

npm upgrade <pkg>

brew upgrade <pkg>

ascii art

colors

emojis

Documentation

Lots of goodies in the Source

nixpks/lib is amazing resource to some helper functions in Nix, but you have to read the comments in the source code

Teach, don't tell

we need to have tutorials who teach

(alongside existing manual)

Documentation / 2

Kill the wiki !!!

“Well it’s a wiki, fix it yourself!”

Have you ever taken a class with multiple teachers at once? 

Better to have no documentation then wrong documentation

Keeping your documentation in a wiki also makes it hard or impossible to keep it where it belongs: in version control right alongside your code.

Have you ever taken a class where there’s one jackass in the room who keeps constantly raising his hand and offering his own (often incorrect) opinions? 

Contributing

How many active?

Contributing / 2

Automatically tag PR

Automatically assign
maintainers to review PR

Commiters should be invated to step away,

 if not having enough time

Thank you

Rok Garbas, @garbas

Make Nix friendlier for Beginners

By Rok Garbas

Make Nix friendlier for Beginners

Nix concepts and ideas are revolutionary. All of us who use Nix/NixOS on daily basis understand how it works and why it works this way. But it took us quite some time to get here. Users just starting with Nix/NixOS are facing many problems, which range from Documentation, UX of our command line tools, Interacting with community, ... and many other areas. I would like to share my views how we can make Nix/NixOS friendlier to beginners without much effort.

  • 2,389