feat(nixos): add configurationLimit option to systemd-boot
This commit is contained in:
parent
3b5eefe456
commit
32a4144c42
2 changed files with 23 additions and 17 deletions
|
@ -4,27 +4,27 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.pantheon) mkStrOption;
|
||||
inherit (lib.pantheon) mkIntOption mkStrOption;
|
||||
cfg = config.machine.bootloader;
|
||||
in
|
||||
{
|
||||
options.machine.bootloader = {
|
||||
type = mkStrOption;
|
||||
configurationLimit = mkIntOption 5;
|
||||
};
|
||||
config.boot = {
|
||||
initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = cfg.type == "systemd-boot";
|
||||
inherit (cfg) configurationLimit;
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
(lib.mkIf (config.machine.bootloader.type == "systemd-boot") {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue