diff options
| author | Raito Bezarius <masterancpp@gmail.com> | 2023-03-18 20:42:09 +0100 |
|---|---|---|
| committer | Raito Bezarius <masterancpp@gmail.com> | 2023-03-18 22:12:31 +0100 |
| commit | 5301677df5dd5cd3c4dd087c59c31d8e8b430711 (patch) | |
| tree | 5fb58b3c117439b440e42016d1106fc5c95f592c | |
| parent | Merge pull request #221809 from wegank/nest-bump (diff) | |
| download | nixpkgs-origin/bootspec-cue.tar.gz | |
nixos/system/activation/bootspec: adopt the latest specificationorigin/bootspec-cue
| -rw-r--r-- | nixos/modules/system/activation/bootspec.cue | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/nixos/modules/system/activation/bootspec.cue b/nixos/modules/system/activation/bootspec.cue index 9f857a1b1cd8..1f7b4afa87ac 100644 --- a/nixos/modules/system/activation/bootspec.cue +++ b/nixos/modules/system/activation/bootspec.cue @@ -1,4 +1,6 @@ -#V1: { +import "struct" + +#BootspecV1: { system: string init: string initrd?: string @@ -7,12 +9,23 @@ kernelParams: [...string] label: string toplevel: string - specialisation?: { - [=~"^"]: #V1 - } - extensions?: {...} } -Document: { - v1: #V1 +// 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 } |
