Skip to content

flake: rename packages.«system».docs to packages.«system».doc#1407

Merged
trueNAHO merged 4 commits intonix-community:masterfrom
MattSturgeon:doc/rename-output
Jun 4, 2025
Merged

flake: rename packages.«system».docs to packages.«system».doc#1407
trueNAHO merged 4 commits intonix-community:masterfrom
MattSturgeon:doc/rename-output

Conversation

@MattSturgeon
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon commented May 28, 2025

Rename the docs package -> doc, as discussed in #1272 (comment).

packages.«system».docs will be defined until 25.11 becomes the "oldest supported release"1 and will always warn when evaluated.

Introduce a perSystem.stylix.aliases option so that different flake modules can query which aliases exist. This is used in flake/packages.nix to remove aliases from the checks output. The submodule is a little over-engineered for defining one alias, but may be useful if you end up adding more. For example, even though #1328 is a new addition, it may be beneficial to also have an apps.«system».docs alias to avoid confusion.

Things done

Notify maintainers

Footnotes

  1. This will happen shortly after 25.05 is marked "unmaintained", a few weeks into the 26.11 unstable cycle.

Copy link
Copy Markdown
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

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

LGTM

@stylix-automation stylix-automation bot added the status: merge conflict Merge conflict label May 31, 2025
@stylix-automation stylix-automation bot removed the status: merge conflict Merge conflict label Jun 1, 2025
Copy link
Copy Markdown
Member

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

Introduce a stylix.perSystemAliases option so that different flake modules can query which aliases exist. This is used in flake/packages.nix to remove aliases from the checks output. The submodule is a little over-engineered for defining one alias, but may be useful if you end up adding more. For example, even though #1328 is a new addition, it may be beneficial to also have an apps.«system».docs alias to avoid confusion.

Looks great!

@MattSturgeon
Copy link
Copy Markdown
Member Author

I've updated this to take the new nix run .#docs app into account.


I've cleaned up the option by moving it into the perSystem submodule and then transposing its value into the flake submodule.

This means the aliases are "invisible"1 within the perSystem submodule and only get added to the respective output attrs outside of perSystem (in flake). Therefore, it is not necessary to filter out alias names when copying packages to checks.

I haven't put any work into refactoring the top-level non-per-system aliases in this PR, as I feel that is out of scope.

Footnotes

  1. Within perSystem, aliases can be read from the stylix.aliases option, but not from (e.g.) the packages option.

@MattSturgeon MattSturgeon requested review from 0xda157 and trueNAHO June 3, 2025 18:36
Copy link
Copy Markdown
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

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

LGTM

@MattSturgeon MattSturgeon force-pushed the doc/rename-output branch 2 times, most recently from 03134a6 to f6681dd Compare June 4, 2025 14:41
@MattSturgeon MattSturgeon requested a review from trueNAHO June 4, 2025 14:42
Use the new `perSystem.stylix.aliases` option to rename
`packages.«system».docs` and `apps.«system».docs` to `doc`.

The alias will be defined until 25.11 and will always warn when
evaluated.
@trueNAHO trueNAHO enabled auto-merge June 4, 2025 15:18
@trueNAHO trueNAHO changed the title flake: rename packages.«system».docspackages.«system».doc flake: rename packages.«system».docs to packages.«system».doc Jun 4, 2025
@trueNAHO trueNAHO merged commit 0db3ec0 into nix-community:master Jun 4, 2025
6 checks passed
@stylix-automation
Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-25.05:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants