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
Make the channel importer versions dynamic #455
Conversation
7d792a3
to
39d768c
Compare
Oh ive been looking for this for a while. |
This way it will be easier to update them because all the information is in one JSON blob (inside Channels.elm file). Ref: NixOS#455
This way it will be easier to update them because all the information is in one JSON blob (inside Channels.elm file). Ref: NixOS#455
This way it will be easier to update them because all the information is in one JSON blob (inside Channels.elm file). Ref: NixOS#455
This way it will be easier to update them because all the information is in one JSON blob (inside Channels.elm file). Ref: NixOS#455
The channels are actually coming from this channels.nix file. I would prefer if we use that way of getting the channels. Here would be the full plan:
Would somebody be willing to work on this? I can help out if you get stuck, either via matrix or short call. |
1. add nixos-org-configurations as input to flake.nix 2. evaluate channels.nix file and export channels via environment variable. that environment variable (lets call it NIXOS_CHANNELS) should be present during the build and inside the nix shell. the content of the variable can be JSON. 3. we pickup the NIXOS_CHANNELS environment variable in frontend/webpack.config.js and pass it further to webpack process, just like we do with ELASTICSEARCH_MAPPING_SCHEMA_VERSION. 4. we forward NIXOS_CHANNELS to Elm via frontend/src/index.js as an Elm application flag. Just like we do with other variables there.
I went ahead and merge with current |
I think this would mean we only get new channels when we update the flake inputs? Even if that process is semi-automated, I wonder if we could update the channels truly dynamically. |
I would like to have control over the channels. To help us reproduce the bugs. I don't think it is a problem if channel comes online a day later. |
🤚 I think I can do it. Or at least give it a shot. I would also like to go on a short call if it's possible to make sure I'm going in the right direction. |
Join us here and lets see when we both have time: https://matrix.to/#/#nixos-search:matrix.org |
Pushed to the wrong repo, point 7 now in here too |
I split the dev shells for frontend and flake info in the last commit since i dont think you should need to down load 4G of elm if you only work on the rust and vice verse. |
/// Information about allowed and default nixos channels. | ||
/// Typyically passed by environment variable NIXOS_CHANNELS. | ||
/// Used to filter the input arguments for `flake-info nixpkgs` and `flake-info nixpkgs-archive` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand the point of checking this in flake-info. What if I want to run nixpkgs-archive
locally on some random branch? Will that fail?
Co-authored-by: Naïm Favier <n@monade.li>
but still provide devShells for each of the subprojects
and define lib = nixpkgs.lib before the call to eachDefaultSystem Also, version = lib.fileContents ./VERSION;
Co-authored-by: Naïm Favier <n@monade.li>
I plan to reuse this JSON file also for other flakes. I guess we should rename it than to something else, but I guess we can do this at the later point in time, but this way we are prepared to grow the channels (or release branches) for other things then nixpkgs. |
I've reverted partially the change and made that both subprojects are there in devShell.default, but you can always select a subproject ( |
…to feat/dynamic-import
flake-info/src/bin/flake-info.rs
Outdated
@@ -237,6 +237,9 @@ async fn run_command( | |||
Ok((exports, ident)) | |||
} | |||
Command::Nixpkgs { channel } => { | |||
// TODO: if NIXOS_CHANNELS environment variable is present check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm closing this PR and open new one to provide a preview for changes. |
I have no idea if this works…
Taken from: https://thekevinwang.com/2021/09/19/github-actions-dynamic-matrix/