Skip to content
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

Extensions for specializationn #147

Open
CertainLach opened this issue Aug 24, 2024 · 1 comment
Open

Extensions for specializationn #147

CertainLach opened this issue Aug 24, 2024 · 1 comment

Comments

@CertainLach
Copy link

In PR #105 extensions field of GenerationV1 was removed in favor of BootJson

However, this limits extensibility: it is now impossible to use structures in this crate to represent extensions only relevant to specific system specializations, extensions are now always only applied to top-level generation.

Due to that, sortKey is now broken in lanzaboote, as it is always inherited from root generation with no possibility to override it in generation: nix-community/lanzaboote#349

CertainLach added a commit to CertainLach/lanzaboote that referenced this issue Aug 24, 2024
Makes it possible to have system specialisation without xen, but now,
only the toplevel system derivation can have xen installed, xen
extension is always ignored for specialisations.

Issue: DeterminateSystems/bootspec#147
@CertainLach
Copy link
Author

I'm not sure why it is implemented this way as it is, current implementation needs to be redone a bit, what about having such implementation of extensibility, with multiple extension points, making it possible for user to define anything he wants, anywhere he wants?

struct GenerationExtension {
  #[serde(rename = "nixos-community.lanzaboote")]
  lanzaboote: ...,
}

trait Extensions {
  type Generation = GenerationExtension;
  type BootSpec = ();
};

struct GenerationV1<E: Extensions> {
  ...
  initrd_secrets: ...,
  toplevel: ...,
  #[serde(flatten)]
  extensions: E::Generation,
}

CertainLach added a commit to CertainLach/lanzaboote that referenced this issue Nov 11, 2024
Makes it possible to have system specialisation without xen, but now,
only the toplevel system derivation can have xen installed, xen
extension is always ignored for specialisations.

Issue: DeterminateSystems/bootspec#147
CertainLach added a commit to CertainLach/lanzaboote that referenced this issue Jan 17, 2025
Makes it possible to have system specialisation without xen, but now,
only the toplevel system derivation can have xen installed, xen
extension is always ignored for specialisations.

Issue: DeterminateSystems/bootspec#147
CertainLach added a commit to CertainLach/lanzaboote that referenced this issue Jan 17, 2025
Makes it possible to have system specialisation without xen, but now,
only the toplevel system derivation can have xen installed, xen
extension is always ignored for specialisations.

Issue: DeterminateSystems/bootspec#147
CertainLach added a commit to CertainLach/lanzaboote that referenced this issue Feb 5, 2025
Makes it possible to have system specialisation without xen, but now,
only the toplevel system derivation can have xen installed, xen
extension is always ignored for specialisations.

Issue: DeterminateSystems/bootspec#147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant