nixos/limine: pass distroName using JSON (#506929)
This commit is contained in:
@@ -491,13 +491,13 @@ def install_bootloader() -> None:
|
||||
config_file += option_from_config('term_margin', ['style', 'graphicalTerminal', 'margin'])
|
||||
config_file += option_from_config('term_margin_gradient', ['style', 'graphicalTerminal', 'marginGradient'])
|
||||
|
||||
config_file += textwrap.dedent('''
|
||||
# @distroName@ boot entries start here
|
||||
config_file += textwrap.dedent(f'''
|
||||
# {config('distroName')} boot entries start here
|
||||
''')
|
||||
|
||||
for (profile, gens) in profiles:
|
||||
group_name = 'default profile' if profile == 'system' else f"profile '{profile}'"
|
||||
config_file += f'/+@distroName@ {group_name}\n'
|
||||
config_file += f'/+{config('distroName')} {group_name}\n'
|
||||
|
||||
isFirst = True
|
||||
|
||||
@@ -506,7 +506,7 @@ def install_bootloader() -> None:
|
||||
isFirst = False
|
||||
|
||||
config_file_path = os.path.join(limine_install_dir, 'limine.conf')
|
||||
config_file += '\n# @distroName@ boot entries end here\n\n'
|
||||
config_file += f'\n# {config('distroName')} boot entries end here\n\n'
|
||||
|
||||
config_file += str(config('extraEntries'))
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ let
|
||||
efi = config.boot.loader.efi;
|
||||
limineInstallConfig = pkgs.writeText "limine-install.json" (
|
||||
builtins.toJSON {
|
||||
inherit (config.system.nixos) distroName;
|
||||
nixPath = config.nix.package;
|
||||
efiBootMgrPath = pkgs.efibootmgr;
|
||||
liminePath = cfg.package;
|
||||
@@ -432,7 +433,6 @@ in
|
||||
replacements = {
|
||||
python3 = pkgs.python3.withPackages (python-packages: [ python-packages.psutil ]);
|
||||
configPath = limineInstallConfig;
|
||||
inherit (config.system.nixos) distroName;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user