Skip to content

overview: use NIX_CONFIG from CI tests#1017

Open
fricklerhandwerk wants to merge 17 commits into
ngi-nix:mainfrom
fricklerhandwerk:simplify-caching
Open

overview: use NIX_CONFIG from CI tests#1017
fricklerhandwerk wants to merge 17 commits into
ngi-nix:mainfrom
fricklerhandwerk:simplify-caching

Conversation

@fricklerhandwerk
Copy link
Copy Markdown
Contributor

this is much less noisy. @imincik any reason not to do it that way?

Comment thread overview/default.nix Outdated
@imincik imincik moved this to In review in Nix@NGI May 15, 2025
@fricklerhandwerk
Copy link
Copy Markdown
Contributor Author

image

this is much less noisy
that way we can access it easily from Nix code for use in documentation
Comment thread .github/workflows/test-demo.yaml Outdated
Comment thread .github/workflows/test-demo.yaml Outdated
@eljamm eljamm force-pushed the simplify-caching branch from ab317c7 to f400351 Compare May 19, 2025 18:01
@eljamm eljamm force-pushed the simplify-caching branch from f400351 to 6e30d04 Compare May 30, 2025 15:47
@eljamm
Copy link
Copy Markdown
Contributor

eljamm commented May 30, 2025

Some changes here are causing CI to attempt building the overview for aarch64, whereas the machine is x86_64.

@fricklerhandwerk
Copy link
Copy Markdown
Contributor Author

Depends on #1092

@fricklerhandwerk fricklerhandwerk changed the title overview: use extra- in NIX_CONFIG overview: use NIX_CONFIG from CI tests Jun 9, 2025
@fricklerhandwerk
Copy link
Copy Markdown
Contributor Author

@erictapen wdyt about the IFD? Not nice I know, but we won't suddenly have a pure Nix YAML parser.

Comment thread overview/default.nix
readFile (pkgs.runCommandNoCC "yaml.json" { } "${lib.getExe pkgs.yj} < ${file} > $out")
);
workflow = from-yaml ../.github/workflows/test-demo.yaml;
nix-config = with lib; trim (elemAt workflow.jobs.test.steps 3).env.NIX_CONFIG;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We may want to have some assertion here that the string starts with extra- or something, such that changing the order of entries won't have surprising effects on the overview.

@eljamm
Copy link
Copy Markdown
Contributor

eljamm commented Jun 9, 2025

@erictapen wdyt about the IFD? Not nice I know, but we won't suddenly have a pure Nix YAML parser.

Why don't we do it the other way around, and have the CI test use a generated nix.conf file, instead?

@fricklerhandwerk
Copy link
Copy Markdown
Contributor Author

Ah, like we evaluate the Nixpkgs revision?

@eljamm
Copy link
Copy Markdown
Contributor

eljamm commented Jun 9, 2025

Ah, like we evaluate the Nixpkgs revision?

It would be as we discussed earlier today for the NIX_CONFIG modularization. So we'd get the nix.settings options and create our own nix.conf, which we can build in CI and just set the NIX_CONFIG env var to its contents. This would allow us to reuse the same config for the overview instructions and CI tests.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants