New users are using NixOS wrong (and it's our fault)

An important part of NixOS marketing strategy could be a hoard marketing, organize activists to keep track of any mentions of NixOS and going there in huge crowds explaining what benefits NixOS has and how to use it properly

I don’t know, I think in various places Nix is already getting the reputation of being overhyped.

Then it means we probably should focus on coming and explaining that it’s not for everyone, but certainly has it’s benefits.
The point is, that hype is the opposite of what a project like nix needs, being well known and recognized for its strong sides is.

9 Likes

No, but you can provide a narrative for understanding the intuition behind something, without having to plunge all the way.

This is what I was trying to do with some of my videos:
https://www.youtube.com/watch?v=LiEqN8r-BRw

Personally, I find it easier to understand a concept if I have some way to relate to another “known” concept. “nix pills” is bad about this, because it introduce a new term, then try to show examples of how it can be manipulated; but if I don’t have an intuition about what that term did originally, then it’s harder conceptualize why the changes are significant (or not significant).

2 Likes

I just realized something about the homepage that’s confusing, too. You’ve got two columns, Nix and NixOS shown prominently, then under that two buttons: “Download” and “Get Started”. Download has options for both Nix and NixOS. But when you click on learn the prominent “Get Started” only has info for Nix, not NixOS. If you scroll down further, you find “Installing NixOS” under “NixOS” manual. Clicking on that, you get dumped into the install section of the entire manual. And indeed, the install section tells you to use nix-env and useradd.

So I think the most natural path from the website gets you straight into detailed installation instructions, but fails to introduce the overall concepts and best practices.

3 Likes

I created a new topic to discuss this issue from the perspective of Nix used on a non-NixOS Linux distro, so this topic can stay focused on the NixOS angle: New users using Nix (not NixOS) wrong.

2 Likes

In my opinion, the easiest way to counter such videos is to have a
“This is how you really should use nixos” video (I did not check if there is, so no offence). In fact, the problem is that the impression on NixOS is formed by non-nixos’ers that, of course, have no clues how to use all the features you would install NixOS for.
If there is a video that’s right about NixOS, I would klick it, just to ‘hype’ that :slight_smile:

I want to reiterate on this comment. There has been a lot of “marketing” efforts around Nix / NixOS and honestly, this is great, but to me the main issue of this user is that they do not even stop to consider that NixOS might be an entirely different thing compared to what they are used to with the rest of Linux distributions.

I’d like to seriously ask whether there is not a mistake in trying to make it look easier than it actually is to install NixOS.

In my (academic) environment, I’ve always been a strong advocate of Nix and NixOS, but I also discourage people to install NixOS without having first learned at least some of the Nix language by practicing Nix in another Linux distribution.

Nix is great: it is easy to install and you can start getting the benefits (especially if you’re a programmer) without taking any risks. You can learn to write a bit of Nix by preparing some default.nix / shell.nix for your projects.

NixOS is even greater but the learning curve is steep. Once you’re in the NixOS world, you face a lot of hurdles due to the unusual way this distribution is built. Therefore, you need to be aware what you are choosing and what are the benefits so that you are ready to pay the price. Especially, if you do not know anything about the Nix language, how can you even configure your system? OK, maybe in the future, there will be a graphical editor for configuration.nix, but until this is the case, we should really ask ourselves whether we are pushing too many unprepared users into NixOS.

I’d rather have a smaller growth rate, but with users that stick to NixOS, rather than a lot of users that try NixOS and become frustrated and disgusted by it.

6 Likes

I think being up-front about the negatives is perfectly valid. When I was “hyping” up the 20.09 release, I had an explicit “What’s the catch?” section https://www.reddit.com/r/linux/comments/jjd6jz/nixos_2009_released/ . One of the worst things you can do is “mislead” people into thinking this is some promised land. It is the promised land in many regards, but software is complex, and there’s often times compromises that have to be made for things to “just work” (buildFHSUserEnv, etc).

7 Likes

but I also discourage people to install NixOS without having first learned at least some of the Nix language by practicing Nix in another Linux distribution.

I’m really hesitant to recommend people to start with Nix on non-NixOS because it is clearly a second-class citizen, which is not good for a first-time exposure.
Off the top of my head:

  • openGL application simply segfault.
  • you have to use nix-env instead of declarative configuration.nix
  • on single user installs, the store is mutable so it can easily be corrupted (and this happens often: every time you run python, it compiles bytecode in the store)
  • on distros without user namespaces (eg debian without special tuning) you end up disabling the sandbox, and some package don’t compile without it because they depend on /bin/sh being bash or because they still pick up FHS libs.
  • on darwin there is (used to be) a bug were if you try to install an unsupported package (eg firefox) nix-env fails without an error message

We only do CI on sandboxed NixOS linux (at least, I don’t know about darwin) so everything else ends up worse user experience. I don’t want to recommend that to potential users.

Also (but this is more personnal) I found helpful to be stuck on NixOS and thus forced to install things the right way. If you are still on $distro, it is easy to give up on $yet-another-evaluation-error and decide to use the mutable, usual way.

1 Like

Can’t we just look in people’s github repos and call it a day? :grin:

1 Like

Nixos is not a linux distro… it’s about a far from unix as you can get. It has a ‘degree’ of unix backward compatibility… but it’s about a close to unix as a apple is to an orange.

we need to patch all the standard utils like ‘adduser’ to display

’ Hi, are you sure you want to be using this…this ain’t ubuntu kiddo’.

that should be enough. :wink:

1 Like

Then of course someone in the community will call it unfriendly gatekeeping. Then turn around and support kicking someone as a troll even though the kicked user actually complained about a true negative experience with NixOS of a person (themselves) woefully underqualified from all sides and underestimating what qualified would mean.

2 Likes

I count myself as a bit of a noob. I think the documentation is pretty good. One thing I find hard to wrap my head around is more the language itself. Where do I put brackets, or braces, what values do I put into arguments?

I find it a lot to remember because I’m not a dev and don’t know any programming languages, and I’m not great at scripting. Like I said, I think the docs are pretty good, but maybe finding a way to make the nix language easier to remember and fully understand, and not by wrote.

I always thought nix-env was for installing user packages as non root, and not being “baked into” the system.

I would like to see nix-env integration with Discover and other gui software managers.

1 Like

Most systems installed by new users are single-user machines, though, and in that case it seems simplest to have all packages “baked into” the system?

I agree with this. I’ve been using NixOS for almost 2 years now but only really felt comfortable writing derivations from scratch this year. Despite knowing functional languages (Scheme, Haskell) the JSON-like syntax of Nix confused me. It seemed that the language revolved around attribute sets in a strange way.

I managed to get by for a while by editing configuration.nix and moving imperatively installed packages into it, but when it came to building software that was not in Nixpkgs (tilem2, now upstreamed), I was extremely confused. See the IRC logs from that day where clever was nice enough to package it for me.

I thought about this onboarding process recently when I was telling friends about Nix and realizing the documentation on how to get started building packages with Nix was somewhat lacking. Perhaps it would be of benefit to have some “problem driven” guide for those kinds of users? See my nix-challenges repo for such an idea.

1 Like

May I ask why? I’m very much beginner and I don’t know much of nix language. For me 2 main benefits of nixos are:

  • My system no longer boots. How do I restore it (NixOS answer - choose older generation)
  • How do my settings different from default (its configuration.nix split across several files).

(I second @siraben in nix language being confusing. It’s probably because pills get way too much into details of derivations before going to ‘useful’ parts. It would be like starting Haskell tutorial with description of thunks or git tutorial with what are BLOBs and references. Yes - both may be needed for understanding what is going on but not really when you just have a problem to solve now.

EDIT: To expand a bit - I think sometimes adding an immediate something working during process of the tutorial is more important than understanding all the details. Probably packaging hello world would be a good first lesson of tutorial rather than lesson 8. Compare it with ebuild tutorials in various places)

4 Likes

May I ask why? I’m very much beginner and I don’t know much of nix language.

In a similar setting, I encourage people to use Nix, because it is a pure addition: you know how you like to manage your system, and that’s great, and let’s use Nix for things I maintain and we need to be identical everywhere regardless of the base system.

Talking people into switching NixOS means talking them into taking an actual risk. This is not always desirable.

3 Likes

I do like the idea of seperating the core system, as defined in the nix config, from a users basic apps. In it’s own way, similar to Fedora Silverblue, or even Apple’s IOS (but you have control instead of Apple). Get the OS how you like it and leave it alone. Then install your apps as a user.

It also avoids the reboot after rebuilding the system.

1 Like

Mainly because I don’t want to take chances at getting people disappointed if they realize that Nix is quite complex only after they are “stuck” with it. I will of course describe all the benefits that using NixOS brings but encourage people to get a bit of experience with Nix first. That was my own experience and it was successful, but of course your mileage may vary.

Besides, I also advocate Nix to people that can benefit of it for specific use cases, but I think that’s actually a separate topic.

1 Like