Use hostPlatform.system in nixos-generate-config#228133
Use hostPlatform.system in nixos-generate-config#228133roberth merged 1 commit intoNixOS:masterfrom name-snrl:fix-nix-in-nixos-generate-config
hostPlatform.system in nixos-generate-config#228133Conversation
nix.package in nixos-generate-config
roberth
left a comment
There was a problem hiding this comment.
Looks ok.
I wonder if we should just put the value of stdenv.hostPlatform.system as a hardcoded value into the script instead. Asking nix itself seemed like the right thing, but I can't think of a realistic use case that needs to query nix at runtime.
|
@roberth I'm not sure about new commit, but it's work for me. |
nix.package in nixos-generate-confighostPlatform.system in nixos-generate-config
|
Passes installer test. |
|
Thanks! |
|
This breaks things for cross-compiled installer images. |
|
@tpwrules what things? If you want the problem to be solved, you'll have to be more specific. |
|
My apologies. This causes I'm not sure whether reverting this commit is the right option or if there's a better source to fill in this field in a hard-coded manner. |
|
@tpwrules The file containing the
My reasoning for using The previous behavior was to pull from
I'm not aware of a better source than eval-time You mention an installer image. Where did that image come from? Maybe something is wrong about the image? Or maybe it should be made a bit more clear that you're not supposed to use a * (perhaps superfluously) host from the GNU terminology: build is where the build is performed, host is where the output of the build runs, target is irrelevant because a NixOS configuration is not a compiler we're compiling. |
|
I publish my own cross-compiled installer images here. They are designed to be cross-compiled from Using the linked commit on an You are right that |
|
#237218 should fix it. Could you give it a try? |
Description of changes
Make
nixos-generate-configrespectnix.packageoptionThings done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)