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

Support additional format search paths #148

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomeon
Copy link
Contributor

@tomeon tomeon commented Apr 15, 2022

via the NIXOS_GENERATORS_FORMAT_SEARCH_PATH environment variable and --format-search-path CLI option, as proposed in #147.

Additionally, introduce the --show-format-search-path option, which causes nixos-generate to print the list of paths it will search for format files.

Marked as a draft because:

  1. It's maybe more complex than admonished, and
  2. Tests, or the lack thereof. Would welcome input on how to approach this. Could add one or more jobs to the GitLab CI configuration that attempt to build artifacts using formats that live in a search path specified via the environment or CLI options. Could also whip up some tests for stuff like checking that nixos-generate (a) rejects bad format names, (b) prints the expected paths when called with --show-format-search-path, (c) prints formats from additional search paths when called with --list, etc.

Thanks!

@Lassulus
Copy link
Collaborator

I actually don't have any tests right now for this :D I don't use the gitlab-ci setup. I don't know if building all images on the github worker is feasible. But for the start, I guess a test command somewhere which builds all images would be a nice thing to have? But that is not really a blocker for this PR I guess (except if you want to do it ;) )

via the NIXOS_GENERATORS_FORMAT_SEARCH_PATH environment variable and
--format-search-path CLI option.

Additionally, introduce the --show-format-search-path option, which
causes nixos-generate to print the list of paths it will search for
format files.
@tomeon tomeon force-pushed the format-search-path-extension branch from 547da9e to 651616b Compare July 17, 2023 02:30
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.

2 participants