Unverified Commit ee8d23b6 authored by Masum Reza's avatar Masum Reza Committed by GitHub
Browse files

nixos/limine: pass distroName using JSON (#506929)

parents a7b5dc60 3a8c4e69
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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'))

+1 −1
Original line number Diff line number Diff line
@@ -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;
          };
        };
      };