Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Use NixOS bootspec and external bootloader #122

@pta2002

Description

@pta2002

RFC 0125 defines the concept of the NixOS bootspec. The core idea is fairly simple: For every system generation, define a boot.json file which contains information about the kernel to be installed.

This file is then ingested by another tool - an external boot loader (see the manual), defined by the boot.loader.external option, which provides an installHook that sets things up for it to be used.

To me, this seems like the perfect architecture for what raspberry-pi-nix wants to do. At the moment, the bootloader is being installed in an ad-hoc way with a one-shot systemd unit. However, this is exactly what the external boot loader backend is for.

If raspberry-pi-nix used this external boot loader backend, it would also play along well with e.g. instalations using EDK2.

My idea then would be to port over that activation script (and I do think it can mostly be ported over as-is) to the external boot loader back end.

I am willing to work on this feature, as I had already done a previous implementation before discovering raspberry-pi-nix, which I only dropped because I couldn't stand the kernel compile times. I am just wondering if it would be something that is desired, or if I should do it on my own fork.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions