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

Add a command to source/include another config file #283

Open
mekb-turtle opened this issue Jul 23, 2023 · 5 comments
Open

Add a command to source/include another config file #283

mekb-turtle opened this issue Jul 23, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@mekb-turtle
Copy link
Contributor

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 ...
@Andy-Python-Programmer
Copy link
Contributor

:Aero
    CMDLINE=$INCLUDE(kernel.toml)

Also having something like the above would be useful.

@blanham
Copy link
Contributor

blanham commented Jul 23, 2023

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

@mekb-turtle
Copy link
Contributor Author

:Aero
    CMDLINE=$INCLUDE(kernel.toml)

Also having something like the above would be useful.

wouldn't that just be the ${variable}=value thing?

@paoloschi
Copy link

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...

@mintsuki mintsuki added the enhancement New feature or request label Mar 19, 2024
@sagehane
Copy link

sagehane commented May 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants