Rewrite the Manual #779

Closed
opened 2025-03-29 22:08:57 +00:00 by kfearsoff · 4 comments
Member

Problem Statement

Lix manual functions alright as a reference point. It is nowhere near perfect for that, as there are many cursed intricacies that you'll only learn in code or in conversations, but it at least does its basic job.

Lix manual as generic documentation, though? It is very, very bad. A very large amount of issues are inherited from CppNix manual, and a number of issues Lix manual more or less fixed - for example, installation chapters are just deferred to the installer! But the overall situation is dire: Lix manual does not help the user actually use the software, at all.

This manual problem stems from the culture around Nix Project, where Nix/Nixpkgs/NixOS manuals were separate manuals with strongly defined boundaries. They were extremely isolated (perhaps mirroring the projects themselves, to a degree), and efforts to have them do more cross-references were unsuccessful.

We are in a unique position where we actually own Lix manual, so we can do it justice and make it a great piece of user-facing documentation.

Scope of Work

  • Rewrite introduction. For now, our new users are 95% Nixers with some experience, 5% brand new people. The distribution will change with time. How do we write a useful introduction for all of them? Could we use an approach similar to Rust Book's "who Rust is for?"
  • Right now, we can't even provide a proper "Quick Start", because our "install" semantics are terrible. What to do? We can copy CppNix's nix-shell-based "Quick Start". We could also drop "Quick Start" entirely, like Rust Book does.
  • Our section on installation is absurdly large. Compilation instructions should go to repo; installation instruction should defer to installer and be compressed.
  • Until we figure out our "install" semantics - our "Package Management" section should guide people on how to set up a sane workflow: probably npins, HM and/or nix-darwin.
  • We should have a section on guiding the user through "building" process. How does a typical derivation look? How is it built and cached? How does NixLang play into that, and how to "grok" it fast? This needs to be an actual section.
  • NixLang reference and spec should be moved way down. No user would care about operator precedence and derivation attributes outside of reference material; and since mdbook doesn't support fold-by-default, it should be moved down.
  • Likewise, command reference takes up screens. It should be at the bottom.
  • Documenting builtins, config files and other stuff should be done together.
  • In terms of "advanced topics" - there's a lot that can be added, but let's just backport IFD docs PR for now.
  • Glossary is... not useless, but it is also a crutch. Currently, the manual relies very much on definitions given in the glossary - and those definitions use 10 other definitions, go in circles, and explain nothing. This is horrible UX. Our terms should not be oppressively unfamiliar. NixLang code = "build recipe", "derivation" = "build plan", "build plan" produces outputs/artifacts. Jujutsu Glossary is a good kind of glossary - it uses established terminology, and glossary just expands on the topic.
  • "Contributing" and "Release Notes" should probably live in the repo, but not in the manual

Additional context

Sadly, I don't think it is possible to improve the manual perfectly iteratively, unless we make gigantic CLs/divide them using "topics". Its structure is very unfortunate.

We also really want #742 first.

## Problem Statement Lix manual functions alright as a reference point. It is nowhere near perfect for that, as there are many cursed intricacies that you'll only learn in code or in conversations, but it at least does its basic job. Lix manual as generic documentation, though? It is very, very bad. A very large amount of issues are inherited from CppNix manual, and a number of issues Lix manual more or less fixed - for example, installation chapters are just deferred to the installer! But the overall situation is dire: Lix manual does not help the user actually use the software, at all. This manual problem stems from the culture around Nix Project, where Nix/Nixpkgs/NixOS manuals were separate manuals with strongly defined boundaries. They were extremely isolated (perhaps mirroring the projects themselves, to a degree), and efforts to have them do more cross-references were unsuccessful. We are in a unique position where we actually own Lix manual, so we can do it justice and make it a great piece of user-facing documentation. ## Scope of Work - [ ] Rewrite introduction. For now, our new users are 95% Nixers with some experience, 5% brand new people. The distribution will change with time. How do we write a useful introduction for all of them? Could we use an approach similar to Rust Book's ["who Rust is for?"](https://doc.rust-lang.org/book/ch00-00-introduction.html#who-rust-is-for) - [ ] Right now, we can't even provide a proper "Quick Start", because our "install" semantics are terrible. What to do? We can copy CppNix's `nix-shell`-based "Quick Start". We could also drop "Quick Start" entirely, like Rust Book does. - [ ] Our section on installation is absurdly large. Compilation instructions should go to repo; installation instruction should defer to installer and be compressed. - [ ] Until we [figure out our "install" semantics](https://wiki.lix.systems/books/lix-contributors/page/replacement-cli-design-profiles) - our "Package Management" section should guide people on how to set up a sane workflow: probably npins, HM and/or nix-darwin. - [ ] We should have a section on guiding the user through "building" process. How does a typical derivation look? How is it built and cached? How does NixLang play into that, and how to "grok" it fast? This needs to be an actual section. - [ ] NixLang reference and spec should be moved way down. No user would care about operator precedence and derivation attributes outside of reference material; and since mdbook doesn't support fold-by-default, it should be moved down. - [ ] Likewise, command reference takes up screens. It should be at the bottom. - [ ] Documenting builtins, config files and other stuff should be done together. - [ ] In terms of "advanced topics" - there's a lot that can be added, but let's just backport IFD docs PR for now. - [ ] Glossary is... not useless, but it is also a crutch. Currently, the manual relies very much on definitions given in the glossary - and those definitions use 10 other definitions, go in circles, and explain nothing. This is horrible UX. Our terms should not be oppressively unfamiliar. NixLang code = "build recipe", "derivation" = "build plan", "build plan" produces outputs/artifacts. [Jujutsu Glossary](https://jj-vcs.github.io/jj/v0.27.0/glossary/) is a good kind of glossary - it uses established terminology, and glossary just expands on the topic. - [ ] "Contributing" and "Release Notes" should probably live in the repo, but not in the manual ## Additional context Sadly, I don't think it is possible to improve the manual perfectly iteratively, unless we make gigantic CLs/divide them using "topics". Its structure is very unfortunate. We also really want #742 first.
Owner

This manual problem stems from the culture around Nix Project, where Nix/Nixpkgs/NixOS manuals were separate manuals with strongly defined boundaries. They were extremely isolated (perhaps mirroring the projects themselves, to a degree), and efforts to have them do more cross-references were unsuccessful.

FWIW it still probably is proper for Lix's manual to not try to be more things than it actually has resources to be. However, it should talk more about how Lix is only made particularly useful in the context of nixpkgs.

Glossary is... not useless, but it is also a crutch. Currently, the manual relies very much on definitions given in the glossary - and those definitions use 10 other definitions, go in circles, and explain nothing. This is horrible UX. Our terms should not be oppressively unfamiliar. NixLang code = "build recipe", "derivation" = "build plan", "build plan" produces outputs/artifacts. Jujutsu Glossary is a good kind of glossary - it uses established terminology, and glossary just expands on the topic.

Agreed, see also: https://archive.fosdem.org/2024/schedule/event/fosdem-2024-3107-units-of-composition-recipes-overlays-and-packages/

We could take some terminology from that, and discuss synonyms.

"Contributing" and "Release Notes" should probably live in the repo, but not in the manual

Release notes should be in the manual because they have a nasty habit of being the complete documentation for features and are really important to catch in search queries. Contributing should plausibly be moved.


Another thing that has been annoying me with the manual is that mdbook does not prioritize page titles in search. I wonder if we can convince it to behave better in this regard.

> This manual problem stems from the culture around Nix Project, where Nix/Nixpkgs/NixOS manuals were separate manuals with strongly defined boundaries. They were extremely isolated (perhaps mirroring the projects themselves, to a degree), and efforts to have them do more cross-references were unsuccessful. FWIW it still probably is proper for Lix's manual to not try to be more things than it actually has resources to be. However, it *should* talk more about how Lix is only made particularly useful in the context of nixpkgs. > Glossary is... not useless, but it is also a crutch. Currently, the manual relies very much on definitions given in the glossary - and those definitions use 10 other definitions, go in circles, and explain nothing. This is horrible UX. Our terms should not be oppressively unfamiliar. NixLang code = "build recipe", "derivation" = "build plan", "build plan" produces outputs/artifacts. Jujutsu Glossary is a good kind of glossary - it uses established terminology, and glossary just expands on the topic. Agreed, see also: https://archive.fosdem.org/2024/schedule/event/fosdem-2024-3107-units-of-composition-recipes-overlays-and-packages/ We could take some terminology from that, and discuss synonyms. > "Contributing" and "Release Notes" should probably live in the repo, but not in the manual Release notes should be in the manual because they have a nasty habit of being the complete documentation for features and are really important to catch in search queries. Contributing should plausibly be moved. --- Another thing that has been annoying me with the manual is that mdbook does not prioritize page titles in search. I wonder if we can convince it to behave better in this regard.

... mdbook does not prioritize page titles in search.

This can be achieved with the boost-title option. I'm currently on vacation, but can send the change in about a week, if not picked up by somefew in the meantime.

(I'll also create a seperate issue and stop hijacking this one)

> ... mdbook does not prioritize page titles in search. This can be achieved with the [boost-title](https://rust-lang.github.io/mdBook/format/configuration/renderers.html#outputhtmlsearch) option. I'm currently on vacation, but can send the change in about a week, if not picked up by somefew in the meantime. (I'll also create a seperate issue and stop hijacking this one)
Author
Member

FWIW it still probably is proper for Lix's manual to not try to be more things than it actually has resources to be. However, it should talk more about how Lix is only made particularly useful in the context of nixpkgs.

Right. My current idea is to defer things like "learn NixLang" and "DIY packaging" to https://nix.dev with links in the manual. It'll take some effort to make a good segue, but I'm confident it can be done and is a good idea.

Glossary is... not useless, but it is also a crutch. Currently, the manual relies very much on definitions given in the glossary - and those definitions use 10 other definitions, go in circles, and explain nothing. This is horrible UX. Our terms should not be oppressively unfamiliar. NixLang code = "build recipe", "derivation" = "build plan", "build plan" produces outputs/artifacts. Jujutsu Glossary is a good kind of glossary - it uses established terminology, and glossary just expands on the topic.

Release notes should be in the manual because they have a nasty habit of being the complete documentation for features and are really important to catch in search queries.

Geh, you're right. Perhaps some wizard can figure out how to fold that section (and command reference) by default, cos the amount of screen space taken is very uncomfortable.

Contributing should plausibly be moved.

I think it should, yeah. We currently have contributing info spread out over git repo, Wiki, and manual. I don't know the right distrubution yet, but I think cutting the manual is a good idea.

See CL#2924 for the first baby steps.

> FWIW it still probably is proper for Lix's manual to not try to be more things than it actually has resources to be. However, it _should_ talk more about how Lix is only made particularly useful in the context of nixpkgs. Right. My current idea is to defer things like "learn NixLang" and "DIY packaging" to https://nix.dev with links in the manual. It'll take some effort to make a good segue, but I'm confident it can be done and is a good idea. > > > Glossary is... not useless, but it is also a crutch. Currently, the manual relies very much on definitions given in the glossary - and those definitions use 10 other definitions, go in circles, and explain nothing. This is horrible UX. Our terms should not be oppressively unfamiliar. NixLang code = "build recipe", "derivation" = "build plan", "build plan" produces outputs/artifacts. Jujutsu Glossary is a good kind of glossary - it uses established terminology, and glossary just expands on the topic. > Release notes should be in the manual because they have a nasty habit of being the complete documentation for features and are really important to catch in search queries. Geh, you're right. Perhaps some wizard can figure out how to fold that section (and command reference) by default, cos the amount of screen space taken is very uncomfortable. > Contributing should plausibly be moved. I think it should, yeah. We currently have contributing info spread out over git repo, Wiki, and manual. I don't know the right distrubution yet, but I think cutting the manual is a good idea. See [CL#2924](https://gerrit.lix.systems/c/lix/+/2924) for the first baby steps.
Owner

Opened an issue about search being useless.

Opened an issue about search being useless.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#779
No description provided.