limine
limine copied to clipboard
Add a command to source/include another config file
I think it would be nice to be able to include other config files in limine.cfg, like how #include works in C
Example:
limine.cfg:
%colors.cfg
TIMEOUT=5
... etc ...
colors.cfg:
TERM_PALETTE=...
TERM_BACKGROUND...
... etc ...
:Aero
CMDLINE=$INCLUDE(kernel.toml)
Also having something like the above would be useful.
Also also, it would be nice to include variable names in the include statements. This would be useful, for example, to include different configs for different architectures
:Aero CMDLINE=$INCLUDE(kernel.toml)
Also having something like the above would be useful.
wouldn't that just be the ${variable}=value
thing?
I logged in precisely with the intention of making the same request, and I see with pleasure that I am not alone in finding that the possibility of importing a separately generated file into limine.cfg
should be very useful.
My use case:
I would like to make kernel install|remove hooks into '/etc/kernel.d' so that, when package manager acts on linuxN.N
packages, my script it would keep the whole entries section of limine.cfg
always updated whith as many entries for as many OSs and modules I have at my disposal at that moment.
It would be like having the equivalent of /etc/default/grub
+grub-mkconfig
but without all the GRUB's bloat...
Edit: I realised I actually don't need this feature in hindsight because something like Lanzaboote handles this differently and I think I prefer their approach more. So the feature I outlined below might be interesting but I don't know if it outweighs the additional complexity.
I'd also want a feature similar to this. It would even be nicer if it's possible to add multiple files with one command using some pattern matching.
My use-case is to add support for Limine on GNU Guix in a manner similar to systemd-boot's usage on NixOS.
On NixOS, systemd-boot is currently used like this:
$ cat /boot/loader/loader.conf
console-mode keep
default nixos-*
editor true
timeout 5
$ tree /boot/loader/
/boot/loader/
├── entries
│ ├── nixos-generation-248.conf
│ ├── nixos-generation-249.conf
│ ├── nixos-generation-250.conf
│ └── nixos-generation-251.conf
├── entries.srel
├── loader.conf
└── random-seed
2 directories, 7 files
This feature is very useful when another tool generates additional Limine config files such as OS-name.conf or snapshots.conf. The tool should not modify the original limine.conf, which is controlled by user to manage and enable/disable including additional config files.
For example, when a kernel version is updated, an initramfs tool overwrites OS-name.conf without disturbing other configurations of other multiple boots in limine.conf.
/+OS name
include: /OS-name/OS-name.conf
include: /OS-name/snapshots/snapshots.conf