ci: test doc generation for modules#177
Conversation
|
Hi @ungeskriptet, thanks for your PR. I appreciate the efforts to include lots of smaller fixes into on PR, but could you please submit the separate ones for the evaluation fixes and for the formatting? |
Hi, this PR is pretty much already split into smaller fixes. Every commit except the last one ( |
|
@ungeskriptet maybe it'd be nice to add the last |
|
I have update this PR to make CI check whether modules can evaluate and have their options properly defined. This should hopefully avoid missing descriptions in the future :) To achieve this, I had to switch the CI runner to aarch64, since some of the modules will only evaluate on When running |
Missing descriptions can cause build errors during `nixos-rebuild` when the following option is enabled: ``` documentation.nixos.includeAllModules = true; ``` Signed-off-by: David Wronek <david.wronek@mainlining.org>
Import dependencies to allow standalone usage. Signed-off-by: David Wronek <david.wronek@mainlining.org>
This will help `nix flake check` import this file as a module. Signed-off-by: David Wronek <david.wronek@mainlining.org>
Set arbitrary default for `cfg.variant` to make evaluation possible when using this module standalone. Signed-off-by: David Wronek <david.wronek@mainlining.org>
All items in the packages output must be derivations, otherwise `nix flake check` will fail. Signed-off-by: David Wronek <david.wronek@mainlining.org>
This will ensure all options have descriptions and are properly defined. To check, use the following command: ``` nix flake check ``` Signed-off-by: David Wronek <david.wronek@mainlining.org>
Signed-off-by: David Wronek <david.wronek@mainlining.org>
| runs-on: ubuntu-latest | ||
| check: | ||
| name: Check flake | ||
| runs-on: ubuntu-24.04-arm |
There was a problem hiding this comment.
Is there no ubuntu-flake-arm docker image to run on?
There was a problem hiding this comment.
These aren't Docker images to my knowledge. It's the underlaying host system.
| # see legacyPackages.<system>.linuxAndFirmware for other versions of | ||
| # the bundle | ||
| inherit (pkgs.linuxAndFirmware.default) | ||
| linux_rpi5 | ||
| linuxPackages_rpi5 | ||
| linux_rpi4 | ||
| linuxPackages_rpi4 | ||
| linux_rpi3 | ||
| linuxPackages_rpi3 | ||
| linux_rpi02 | ||
| linuxPackages_rpi02 | ||
| raspberrypifw | ||
| raspberrypiWirelessFirmware | ||
| ; |
There was a problem hiding this comment.
This is kind of a breaking change... I wonder whether an evaluation error should be thrown instead? But maybe it will cause nix flake check failures... I'm also surprised that nix flake check doesn't allow attribute sets of packages.
There was a problem hiding this comment.
I have tried adding a throw statement here but that unfortunately also causes nix flake check to fail (since it's not a derivation). But evaluation will fail with an error anyway since the package will be missing.
Having a formatter significantly improves code quality and also helps contributors maintain a consistent coding style. The code can be formatted by using the commandnix fmt.I have also added missing descriptions to options to fix
nixos-rebuildwhendocumentation.nixos.includeAllModulesis enabled.