fix: detect host platform in init and clarify remote SSH probe failures#470
fix: detect host platform in init and clarify remote SSH probe failures#470RobertDeRose wants to merge 2 commits intonumtide:mainfrom
Conversation
eureka-cpu
left a comment
There was a problem hiding this comment.
Thank you for the contribution and clean individual commits @RobertDeRose 🙂
|
The debian container is failing a bit ambiguously, maybe just needs to be retried. All other checks passed. |
|
@eureka-cpu No problem. I'll see if I can figure out what about this change fails on Debian |
I just re-ran it and it passes, must've been a network error: https://buildbot.numtide.com/#/builders/3075/builds/8 |
- render the generated system.nix template with the current host architecture instead of always emitting x86_64-linux
- distinguish SSH connection/authentication problems from a successful remote login where nix-store is actually missing - point users at the equivalent ssh command to verify their target host and options first
1a84a08 to
75c7096
Compare
|
@jfroche I believe I have addressed all your feedback |
picnoir
left a comment
There was a problem hiding this comment.
Overall, I think this feature makes sense. But I don't think this is the right approach, it is a bit brittle. Instead of search-replacing x86_64-linux, we should use a generic placeholder and override it to inject the arch-os duo.
That being said, chris approved this, let's not drive you mad with a gazillion back and forth. Let's merge that and I'll fix this in a subsequent commit.
Let's remove the useless tests and merge this.
Also, if this is LLM generated, please review the output before submitting it in the future.
|
@picnoir i hadn't reviewed the latest commit, I think originally it looked okay and I agree it is a bit brittle but then we also have to consider that the template must also work for |
|
|
||
| let system_config_filepath = path.join("system.nix"); | ||
| init_config_file(&system_config_filepath, SYSTEM_MODULE_TEMPLATE)?; | ||
| let host_platform = std::env::consts::ARCH.to_owned() + "-linux"; |
There was a problem hiding this comment.
I missed this. Please keep in mind that not every ARCH is a system supported by the flake, and the system namespace may be different between rust and nix, so you may want to have an explicit mapping and error for those cases.
Summary
system-manager initgeneratessystem.nixx86_64-linuxin scaffolds created on non-x86_64-linuxhostsnix-storePATH failuresTesting
nix develop --accept-flake-config --command cargo test -p system-manageraarch64-linuxLima VM that upstreammaingeneratesnixpkgs.hostPlatform = "x86_64-linux";fixes #469