George Hotz checking out Nix for the first time :-)

If a legendary hacker finds it too complicated, it’s way too complicated for the average user.

Personally, I am not a fan of flakes. They just add more complicated DSL boilerplate on top of an already complicated system. That is why I created Botnix as a fork, which intends to be a minimized and simplified version of NixOS for intelligent embedded systems. It has only just begun.

1 Like

Personally, I am not a fan of flakes. They just add more complicated DSL boilerplate on top of an already complicated system.

They restrict in order to simplify.

Liberties constrain, constraints liberate.

The boilerplate gives a starting point whereas nix without flakes is an overwhelming blank page.

6 Likes

https://nixos.org/learn does point to nix.dev under “First Steps with Nix”; and the /learn page is linked to with the “Get started” button on the https://nixos.org/ landing page.

That’s not to say “problem already solved” so much as “your proposed solution is already implemented, isn’t it?”.

Ha. I do like the README remark on hlissner’s dotfiles of “it was hard for me, it should be hard for you too”.

The more nix there is, the more I get to freeload off of nix. People who benefit from other people writing Nix, without having to write Nix themselves. e.g. llama.cpp is a popular fast-moving repo, and has a flake.nix; since it’s got a flake.nix, I can use it without even having to copy-and-paste “install these packages”.

Some stuff (like write Nix code for your own bespoke case) might be unavoidably difficult. But it’d be nice if things that are really easy on other OSs were also quite easy on NixOS.

Excellent question.

And:

I do think that would help. – I’d be cautious about reading some blogpost from 2011 and expecting it work today.

I sympathise with this “cowboy, too impatient to read the docs” attitude. With programming in general… a lot of the time you can get by without needing to read the docs. – It’s good to find an example that’s pretty close to what you want to do, understand as much about it as you need to, and just change the bits that look relevant.

Sure, there are things that could make this approach smoother, with various costs. (Bigger community => more StackOverflow questions asking novice questions like “why did I get this error message”, etc.).

If I had pixie dust, another thing I’d wish for is that alongside the hype for Nix came an understanding that writing Nix code is not easy. e.g. Rust is still has a lot of hype, but I think people also have the understanding that learning Rust can be very difficult. – Whereas with Nix, it’s really common to see people try something which is really easy on other Linux systems, but really difficult on Nix, get frustrated, and give up.

6 Likes

An interesting idea I’ve seen in a few web docs is a really handholdy lesson-like tutorial. It would have all the advantages of an in-depth video while also being easily searchable and accessible.

Something like this is a great example or what I mean: https://docs.astro.build/en/tutorial/0-introduction/1/

You can also explicitly highlight any facts with a quiz qt the end like this: Send your first script to the browser | Docs

A couple with things like “Install NixOS on a VM”, “Write your first package”, “Create a self-contained development environment with <flakes/nix-shell>” etc. could really help a beginner, but I understand that it would be a lot of effort as well.

2 Likes

I think there’s an old issue for this exact problem. Someone (@roberth ?) suggested adding an option back reference to packages that are mentioned as default packages in options. This is the exact thing I ran into many times when I started out. I quit nix about 5 times over 10 years before sticking with it.

The newcomer experience is brutal and fulfils the prophecy of “linux is free if you have a lot of time” (or whatever the exact version of that is). Hopefully https://nixlang.wiki will make a dent in that. https://nix.dev still feels too cumbersome to contribute to.

1 Like

https://github.com/NixOS/nixos-search/issues/506

It seems to be the top issue in the nixos-search repo.

3 Likes

Indeed. Only 8 :+1: , so I added my thumbs up too.

Yes, your summary isn’t too far off. :smile:

Still I’d like to make one last point on this whole issue: You can write documentation in a way that people who don’t actually read it can still go and use it and do their copy-paste-iterate approach.

My suggestion would just be trying that a bit more.

1 Like

too bad it takes someone popular for us to acknowledge beginner guide shortcomings.

2 Likes

I’ve read answers from many people here, and most seem to be somewhat familiar with the Nix ecosystem.
I’d like to give my two cents as someone who’s tried to learn Nix multiple times, but always ended up shying away from it after a couple of weeks.

As many people have pointed out, I too find the documentation to be confusing. There seem to be at least 3 ways to solve the same problem, Flakes, ‘normal’ Nix and some other, while it is rarely explained to me, why I should use one over the other…
At the same time, I feel like the guidance for beginners is still too technical(?).
I’ve read a whole lot of official and unofficial documentation by now, and I can’t do more than write an EXTREMELY simples Nix file by myself. Whenever I look something up, the amount of information that gets blasted (for the lack of a better word) at you, is immense while still not seeming to be the thing one is looking for (as a beginner).

I hope this doesn’t seem like me being butthurt about being unable to learn Nix. I really appreciate everything the community is doing and would like to become a proper part of it sometime, so that I can give back by contributing in some way.

But at least for the time being, I feel like I’m stuck at the very beginning, without a way to make any meaningful progress.

5 Likes

Yes you are spot on, but my feeling is: in spite of this being a long thread already, I am not sure if we have reached anything resembling a consensus on the two main things:

  • What exactly are the present shortcomings?

  • How to create an actually effective onboarding experience for newcomers that eliminates the shotcomings?

In one of my posts above I said we might need some brainstorming. That wasn’t just a joke. To me a video like that is actually really valuable information because you have a free and natural live recording of a fairly competent user approaching your piece of software and trying to make sense of it. So I’d say, naturally I would wanna learn from seeing that. It’s almost like you are getting a single piece of free experimental data.

Because the current stage were people are left on their own is basically what @4761 has said:

But at least for the time being, I feel like I’m stuck at the very beginning, without a way to make any meaningful progress.

I know that all too well. And I might not even be past that stage myself.

Maybe we should team up and see if we can find systematically the pain-points that get people stuck in that place?

2 Likes

I think @fricklerhandwerk did some user tests with simple usecases:

  • download and install nix
  • install a package
  • open the program in the package

IIRC most got confused by the homepage. There have been multiple threads and issues about it

Those two topics have suggestions within them and related topics that can result in a PR for the homepage, which IMO is the first step. The homepage is probably an important entry point for newcomers. If it isn’t clear, it will turn away new users It isn’t clear and turns away potential new users.

I do not know if there is reluctance to change it, fear of doing so (“I don’t know what this is, so how am I supposed to know what to write?”, “is only the marketing team allowed to change this?”, and similar feelings), or inability to do so (what in the world .tt? can only nix users contribute with the nix-shell requirement?, etc.), or all the above.

2 Likes

Perhaps a beginners Nix book similar to “Learn You a Haskell for Great Good!” or “Clojure for the Brave and True” could help. Or is Nix too vast to pull something like that off?

I guess also getting some hands on resources like https://exercism.org/ could help, but that focus would be mostly on the programming language.

Personally I use Nix in so many different ways:

  • System/Environment
    • Managing system level configuration and software for Linux machines via NixOS
    • Managing user level configuration and software via Home Manager
    • Using NixOS-WSL to generate custom WSL distributions
  • Projects
  • One-offs
    • using nix shell/run to execute software I use rarely (comma can be used here for even more convenience)

I know there are a lot of other ways to use it like creating modules/profiles for the workplace where teams can share part of their setup. You can build VMs. You can package software in bundles that can execute anywhere. Those are just things that come to mind.

Braindump of topics:

  • Nix the language
  • Nixpkgs
    • Nixpkgs lib
    • The module system
    • Packages
    • NixOS
  • Shells (dev shells)
    • Direnv integration
    • Declarative project environments
    • Interactive adhoc/oneoff shells
  • Home Manager - manage user level configuration
  • Flakes
    • Intro to flakes and the new CLI
    • flake-parts
    • treefmt-nix
    • pre-commit-hooks.nix
5 Likes

Thank you @nixinator for summarizing the trajectory of the video and some key points!

That’s still what I am doing. I’ve seen so many small projects pop up around Nix and being abandoned quickly that I’m very cautious to depend on any third-party tool. I still haven’t even started using home-manager :grimacing:
I know that and devenv have a strong backing by the community, so this feels more like a me-problem.

Not verbatim, maybe, but after reading the docs it’s striking how similar the format is to flakes, and how its approach could solve the use-cases that currently are served by user profiles, system-manager, nix-darwin and home-manager.

With all the constant issues we have around flakes and the fact that it’s still uncertain how to even reach feature parity with “old-school” Nix in some regards, I’m wondering whether it’s time to re-think the “one file for everything” approach for flakes.

2 Likes

As someone who installed Nixos about 3 weeks ago, I read this thread with great interest. For some context, I’ve worked in IT for nearly 30 years, sysadmin, developer, devops, in over 20 years of Linux use I’ve had desktops and servers of Redhat, Fedora, Debian, Slackware, Gentoo and others. My nephew (also dev/devops, and he knows functional programming) told me about Nixos and so I downloaded an ISO and installed it.

My experience has taught me to be cautious, so I went vanilla, no flakes, no Home Manager, just pure configuration.nix. All good. I read a bit of documentation, the install went OK, but it has to be said that I didn’t install anything except X and Plasma so I ended up with a very simple config file. And like many people, I was left without a functional profile. Neither a system profile nor a per-user one. Lots of dead symlinks. A lot of googling and reading and being confused and I found out that oh, you don’t really need a profile any more, because channels, apparently … and now I know about two sets of tools, the (deprecated??) nix-* and nixos-* and the newer nix tool. Remove the dead symlinks and find out that (some?) nix-env commands recreate it … broken. Jesus wept. So I figured out how to fix all the broken symlinks and I think I have a profile? Does it matter?! It seems to allow me to give my custom config to some daemons / services / X and KDE userland stuff.

My laptop is multi boot, so I was under no pressure to make it work quickly. The plan was to start installing the stuff I use and see if I could get a usable system. Which I did in 3 or 4 days. I must have spent nearly a day screwing around with bootloaders :joy: Nixos has been my quotidian OS since then.

As a long time Linux user, my environment is pretty customised. It’s mostly in a git repo and I have Ansible playbooks to do some of the tedious bits, so I haven’t converted my existing customisation to anything nixy yet. And this is where the trouble really starts …

Just trying to get packages installed, started at boot and with a custom configuration involved a huge amount of googling because the documentation either didn’t answer any of the questions I had or I couldn’t find it. And neither could Google because I ended up reading about a lot of 3rd party stuff. The same quandary as everyone else … do I embrace Flakes? Is Home Manager enough? Should i shun 3rd party tools altogether? Why does the base OS leave such problems to be solved?

So many of the problems I needed to solve and googled for only had solutions using such 3rd party tools. I have managed to solve most of my problems now, but it’s been a savage struggle at times. Including, but not limited to, Libreoffice’s environment variable requirements, vim plugins that need python in a venv, trackpad gestures (God bless you libinput-gestures) and more.

I actually really like Nixos, it’s a great concept and it will be my main OS for a while. But then I loved Gentoo for 10 years hehe. And Slackware for another 2 or 3. I was motivated to solve my problems. I have written Gentoo ebuilds, Slack packages, perl modules, python packages … and I have to say the idea of writing a nixpkg is the most fearsome prospect yet :joy:

Two questions if I may:

Should I start using Flakes or Home Manager?

Should I make posts about some of the specific weird problems I’ve solved and if so, where?

Cheers,
Rich

6 Likes

@octomancer: It sounds like you have experience, patience and a desire to learn.

You should definitely check out Eelco’s thesis which explains in detail how the nix package manager works. Once you understand that, all of the weird parts of NixOS will make more sense.

My two cents about the whole issue being discussed here is that we have fantastic documentation for people who are willing to slowly learn, but absolutely awful documentation for people who want to leverage our tools quickly with a shallow understanding.

1 Like

Make the tool more “stupid” friendly.

Docker and Flatpak are easy to use and you don’t even need to read any documentation to run something.

2 Likes

I had a similar question as you, @octomancer , when I started. Got told to not worry too much and now I haven’t yet used either of these. Though I think I’ll start using flakes this month.

For the home user, I believe flakes solve problems I don’t have (installing exactly the same software from a single unchanging version of Nixpkgs on two different machines) and introduce problems I don’t want (getting weirdly opinionated about my Git commit workflow, downloading lots of extra copies of Nixpkgs, distracting abstractions involving my system architecture that seem way overengineered for a single-machine use case). Would not recommend unless you know what you want out of it and are willing to put up with a double scoop of nonsense. Thank goodness the old channels-oriented stuff isn’t deprecated yet; it’s exactly the abstraction I expect from a Linux package manager.

Home Manager, on the other hand, is very unintrusive. It works as advertised, and you can roll into it incrementally. I started out just with a list of packages in my Home Manager config and have, over several years, started migrating more and more dotfile contents to it. Would recommend; it’s easily reversible if you encounter problems with it (but I never have).

4 Likes

If this is relevant to the geohot video and not just a preexisting desire that’s being dumped here because this is turning into the ‘general usability issues’ thread, what specifically did geohot try that the tool should have done something different with?

For example, when geohot ran nix run mediawiki, was the issue that the tool was not ‘stupid’-friendly enough? If so, what should it have done? (docker run mediawiki launches a container image containing Mediawiki and enough of a stack to usefully run it, because Docker is a container tool and not a package manager. Flathub doesn’t contain a Mediawiki, of course, so flatpak run org.mediawiki.MediaWiki or whatever can’t be expected to work, and Flatpak scores as just as easy as Nix on this metric.)

If that is an unlucky example, can you present any different example from the video in which geohot did the right thing and it was the tool that needs fixing?

1 Like