28 lines
706 B
Nix
28 lines
706 B
Nix
{ ... }:
|
|
{
|
|
flake.modules.nixos.limine =
|
|
{ config, lib, ... }:
|
|
let
|
|
primaryDisplay = lib.findFirst (display: display.primary) null (
|
|
builtins.attrValues config.facts.machine.displays
|
|
);
|
|
interfaceResolution =
|
|
if primaryDisplay != null && primaryDisplay.width != null then
|
|
"${toString primaryDisplay.width}x${toString primaryDisplay.height}"
|
|
else
|
|
null;
|
|
in
|
|
{
|
|
boot.loader = {
|
|
efi.canTouchEfiVariables = true;
|
|
limine = {
|
|
enable = true;
|
|
maxGenerations = 10;
|
|
resolution = interfaceResolution;
|
|
|
|
style.interface.resolution = interfaceResolution;
|
|
};
|
|
};
|
|
};
|
|
}
|