- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 132
peripheral-firmware: extract on boot by default #94
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
base: main
Are you sure you want to change the base?
Conversation
| I do not think I agree with this change at this time. 
 Let's revisit this once the mechanism by which firmware updates occur is defined. I will give some more thought to the flakes case in a bit. It might even be possible to grab the firmware files ourselves using bits of the installer and sidestep this issue. | 
488feab    to
    88ce930      
    Compare
  
    7cf4746    to
    b75fc50      
    Compare
  
    | Is it possible we could have this available as a module option, off by default? I would like to use it, but would have to maintain my own fork of nixos-apple-silicon, or use @Enzime's branch if it's not maintained here. | 
| @tpwrules would you be more willing to accept this change if the extraction happened during stage-1 boot instead of stage-2? Then to my knowledge there should be no race. Admittedly there's still the issue of not having the firmware tied to the generation, but if we moved firmware initialization/extraction from this PR to stage-1, we could also utilize something like agenix for encrypting the firmware and then decrypting it during stage-1, so if someone wants to have their config public, they still could. WDYT? | 
This improves the situation for flake users, as previously they had to either add the non-redistributable firmware to their repositories or go without the firmware. This change also brings the ISO into line with the regular NixOS modules as storing the peripheral firmware in the Nix Store is no longer a requirement.
b75fc50    to
    7df41aa      
    Compare
  
    | Asahi Linux has not really changed on this aspect unfortunately, and I still think this PR is an awkward middle. I don't think a stage one hugely improves the issues I raised earlier, and there are some more issues like firmware being bigger and slower to extract (lengthening boot), and limited EFI partition space meaning large initrds are a big problem and I suspect an entire Python installation is bigger than the firmware. It would be extremely awesome, and probably an unfeasible amount of work, if we could write a derivation that downloads the macOS installer ISO and extracts the firmware much like the Apple Silicon installer does. This could at its base be done with ranged requests to avoid downloading whole dozen gigabytes, and there might be Python libraries now that let us mount the images to copy the files out. I don't recall exactly how the installer does it but it has some shortcuts here we could reuse and improve upon as the files we need are relatively small. But the more pragmatic solution I think is to simply use  | 
| Someone has already done that here with Nix even: https://github.com/JJJollyjim/firmware-abomination I no longer use Asahi so I don't have much interest in updating this PR | 
This improves the situation for flake users, as previously they had to either add the non-redistributable firmware to their repositories or go without the firmware.
This change also brings the ISO into line with the regular NixOS modules as storing the peripheral firmware in the Nix Store is no longer a requirement.