Merge pull request #285114 from WilliButz/improve-uki-settings-merging

nixos/boot.uki: allow partial overrides of default UKI settings
This commit is contained in:
nikstur 2024-02-08 21:15:08 +01:00 committed by GitHub
commit 4d2c5b722a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,16 +51,16 @@ in
else else
"nixos"); "nixos");
boot.uki.settings = lib.mkOptionDefault { boot.uki.settings = {
UKI = { UKI = {
Linux = "${config.boot.kernelPackages.kernel}/${config.system.boot.loader.kernelFile}"; Linux = lib.mkOptionDefault "${config.boot.kernelPackages.kernel}/${config.system.boot.loader.kernelFile}";
Initrd = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"; Initrd = lib.mkOptionDefault "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}";
Cmdline = "init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}"; Cmdline = lib.mkOptionDefault "init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}";
Stub = "${pkgs.systemd}/lib/systemd/boot/efi/linux${efiArch}.efi.stub"; Stub = lib.mkOptionDefault "${pkgs.systemd}/lib/systemd/boot/efi/linux${efiArch}.efi.stub";
Uname = "${config.boot.kernelPackages.kernel.modDirVersion}"; Uname = lib.mkOptionDefault "${config.boot.kernelPackages.kernel.modDirVersion}";
OSRelease = "@${config.system.build.etc}/etc/os-release"; OSRelease = lib.mkOptionDefault "@${config.system.build.etc}/etc/os-release";
# This is needed for cross compiling. # This is needed for cross compiling.
EFIArch = efiArch; EFIArch = lib.mkOptionDefault efiArch;
}; };
}; };