mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
bc502d0a14
This removes the feature preview warning, enable by default bootspec, adds a validation flag to prevent Go to go into build-time closure. This will break all downstream users of bootspec as those changes are not backward-compatible.
31 lines
876 B
CUE
31 lines
876 B
CUE
import "struct"
|
|
|
|
#BootspecV1: {
|
|
system: string
|
|
init: string
|
|
initrd?: string
|
|
initrdSecrets?: string
|
|
kernel: string
|
|
kernelParams: [...string]
|
|
label: string
|
|
toplevel: string
|
|
}
|
|
|
|
// A restricted document does not allow any official specialisation
|
|
// information in it to avoid "recursive specialisations".
|
|
#RestrictedDocument: struct.MinFields(1) & {
|
|
"org.nixos.bootspec.v1": #BootspecV1
|
|
[=~"^"]: #BootspecExtension
|
|
}
|
|
|
|
// Specialisations are a hashmap of strings
|
|
#BootspecSpecialisationV1: [string]: #RestrictedDocument
|
|
|
|
// Bootspec extensions are defined by the extension author.
|
|
#BootspecExtension: {...}
|
|
|
|
// A "full" document allows official specialisation information
|
|
// in the top-level with a reserved namespaced key.
|
|
Document: #RestrictedDocument & {
|
|
"org.nixos.specialisation.v1"?: #BootspecSpecialisationV1
|
|
}
|