nixos/limine: forceMbr -> force

This commit is contained in:
Sizhe Zhao
2025-10-06 21:48:31 +08:00
parent d3baaf2963
commit 3fbc40c0ac
2 changed files with 13 additions and 6 deletions
@@ -630,15 +630,15 @@ def install_bootloader() -> None:
if config('partitionIndex'):
limine_deploy_args.append(str(config('partitionIndex')))
if config('forceMbr'):
limine_deploy_args.append('--force-mbr')
if config('force'):
limine_deploy_args.append('--force')
try:
subprocess.run(limine_deploy_args)
except:
raise Exception(
'Failed to deploy BIOS stage 1 Limine bootloader!\n' +
'You might want to try enabling the `boot.loader.limine.forceMbr` option.')
'You might want to try enabling the `boot.loader.limine.force` option.')
print("removing unused boot files...")
for path in paths:
@@ -22,7 +22,7 @@ let
biosSupport = cfg.biosSupport;
biosDevice = cfg.biosDevice;
partitionIndex = cfg.partitionIndex;
forceMbr = cfg.forceMbr;
force = cfg.force;
enrollConfig = cfg.enrollConfig;
style = cfg.style;
maxGenerations = if cfg.maxGenerations == null then 0 else cfg.maxGenerations;
@@ -43,6 +43,13 @@ in
inherit (pkgs.limine.meta) maintainers;
};
imports = [
(lib.mkRenamedOptionModule
[ "boot" "loader" "limine" "forceMbr" ]
[ "boot" "loader" "limine" "force" ]
)
];
options.boot.loader.limine = {
enable = lib.mkEnableOption "the Limine Bootloader";
package = lib.mkPackageOption pkgs "limine" { };
@@ -169,9 +176,9 @@ in
'';
};
forceMbr = lib.mkEnableOption null // {
force = lib.mkEnableOption null // {
description = ''
Force MBR detection to work even if the safety checks fail, use absolutely only if necessary!
Force installation even if the safety checks fail, use absolutely only if necessary!
'';
};