Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for common flake outputs #5955

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Radvendii
Copy link
Contributor

First attempt at addressing #5716

Some issues with this:

  1. Kind of verbose.
    • it would be nice if there were a standard conversion between singular / plural as discussed in Rename defaultX flake outputs to X.default #5532, as the documentation could be half as long.
    • I'm not sure if this is the right place for all the information that it contains. maybe we want something more slimmed down with references to where to find the rest of the information (for instance, apps could just have a link to the nix run page, and not tell people how nix run works.
  2. Bundler interface is in flux right now, so that section is wating on bundle: pass drv attrset instead of path #5456
  3. I've never used Hydra, so I don't know what to write for the hydraJobs section.
  4. I'm worried that this will become out of date very quickly. How are we going to make sure it gets kept up to date?

@Radvendii Radvendii self-assigned this Jan 21, 2022
@edolstra
Copy link
Member

To prevent it from becoming outdated, maybe it should be restricted to flake outputs that are used/recognized by nix itself (including ones that are checked by nix flake check, like nixosModules).

The manpage for nix flake check contains some of this info already in the "Evaluation checks" section, so maybe we should merge that section into this list to avoid redundancy.

Comment on lines +432 to +434
Used-by: `nix flake check`
Checked: Yes
Type: systemAttrs (attrsOf (derivation))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't format in a nice way, namely "Used-by: nix flake check Checked: Yes Type: systemAttrs (attrsOf (derivation))".

@edolstra edolstra mentioned this pull request Feb 10, 2022
17 tasks
@garbas garbas self-assigned this Apr 7, 2022
@tomberek
Copy link
Contributor

tomberek commented Apr 7, 2022

  • cross-reference with templates repo

@stale stale bot added the stale label May 21, 2023
@thufschmitt thufschmitt removed their assignment Jun 2, 2023
@stale stale bot removed the stale label Jun 2, 2023
@Ericson2314 Ericson2314 marked this pull request as draft June 14, 2023 20:04
@Ericson2314 Ericson2314 changed the title WIP: add documentation for common flake outputs Add documentation for common flake outputs Jun 14, 2023
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Jun 14, 2023
@Ericson2314
Copy link
Member

Formally marking as draft, given old title.

@iFreilicht
Copy link
Contributor

Oh my, I've been searching for something like this for weeks! The best I could find is the "Output Schema" section on the NixOS Wiki page on Flakes.

To prevent it from becoming outdated, maybe it should be restricted to flake outputs that are used/recognized by nix itself (including ones that are checked by nix flake check, like nixosModules).

That might help with preventing outdated info, but it would lead to the same problem we already have, which is that documentation is split across many different locations. Of course, the specifics of nixosConfigurations should be documented in the NixOS wiki, but having all "well-known" output names listed here would be very useful for discoverability. The PR already addresses this by specifically explaining that these are only a convention, and any tool can basically use any output it wants.

I agree that this PR right now is not perfect, though. Every output should be linked to the tool that uses it, and the formatting needs to be fixed.

Apart from that, this seems like a very important addition to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation flakes new-cli Relating to the "nix" command
Projects
Status: Friday Hacking Extravaganza
Development

Successfully merging this pull request may close these issues.

8 participants