-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Fix formats/sd* #203
Fix formats/sd* #203
Conversation
Tested working on both the Pi 3 Model B and Pi 4 Model B 1GB. |
@LegitMagic I suspect that at some point in time there was no upstream support for the rpi in nixpkgs and hence it was copied here. However if it works we should just drop the duplicated code here and use nixpkgs has to offer if you can confirm it works. |
formats/sd-aarch64.nix
Outdated
}; | ||
|
||
in { | ||
{ | ||
imports = [ | ||
"${toString modulesPath}/installer/sd-card/sd-image.nix" |
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.
If this would just work without us having to duplicate all the code below, than I am fine with that:
"${toString modulesPath}/installer/sd-card/sd-image.nix" | |
"${toString modulesPath}/installer/sd-card/sd-image-aarch64.nix" |
Less code to maintain in nixos-generators. After all nixos-generators is just a cli to navigate all the images found in nixpkgs through a convenient, discoverable interface.
4a6b7a2
to
4e4a8b5
Compare
Should be good now |
bors merge |
203: Fix formats/sd* r=Mic92 a=LegitMagic During the [movement](NixOS/nixpkgs#110827) of the nixpkgs module paths for sd*, more than just the cd-dvd -> sd-card was changed. As noted within the [old nixpkgs module location](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix), the intended change of location was sd-card/sd-image-aarch64-installer, rather than just a path change. For the non installer version for sd-aarch64, I've updated the version here with the version from nixpkgs, minus the import of profiles/base.nix. This means that the images produced should work on the Pi 4 as well as the Pi 3. Although I have not personally tested on hardware. The removal of the CMA kernel param is deliberate, as 32M is too low for the Pi 4, and that it would need to be either upped to the default for the Pi 4 of 64M, or the option removed and let defaults take care of it. More information about the motivation of these changes can be seen in this comment #168 (comment). In regards to a bit of discussion, is it worth having our own copy of the nixpkgs version of sd-aarch64? The only difference I could really tell is that the version in nixos-generators doesn't include profiles/base. In my opinion there's not much of a need for profiles/base to be included, but does it hurt to do so? I'm pretty new to Nix so I'm not fully aware of its features, but as far as I understand it, I don't think there's a way to override what gets imported in an import. Co-authored-by: LegitMagic <[email protected]>
Canceled. |
bors merge |
203: Fix formats/sd* r=Mic92 a=LegitMagic Co-authored-by: LegitMagic <[email protected]> Co-authored-by: Jörg Thalheim <[email protected]>
Build succeeded: |
Mhm. Look like it got merged but the pr was not closed: https://github.com/nix-community/nixos-generators/commits/master |
During the movement of the nixpkgs module paths for sd*, more than just the cd-dvd -> sd-card was changed. As noted within the old nixpkgs module location, the intended change of location was sd-card/sd-image-aarch64-installer, rather than just a path change.
For the non installer version for sd-aarch64, I've updated the version here with the version from nixpkgs, minus the import of profiles/base.nix. This means that the images produced should work on the Pi 4 as well as the Pi 3. Although I have not personally tested on hardware. The removal of the CMA kernel param is deliberate, as 32M is too low for the Pi 4, and that it would need to be either upped to the default for the Pi 4 of 64M, or the option removed and let defaults take care of it.
More information about the motivation of these changes can be seen in this comment #168 (comment).
In regards to a bit of discussion, is it worth having our own copy of the nixpkgs version of sd-aarch64? The only difference I could really tell is that the version in nixos-generators doesn't include profiles/base. In my opinion there's not much of a need for profiles/base to be included, but does it hurt to do so? I'm pretty new to Nix so I'm not fully aware of its features, but as far as I understand it, I don't think there's a way to override what gets imported in an import.