11.stylix/modules/limine/nixos.nix
NAHO 16df6b8448
treewide: rename mkTarget's configElements and extraOptions options
Rename mkTarget's 'configElements' argument to 'config' and
'extraOptions' to 'options' to provide a more transparent interface with
the underlying Nixpkgs module system.
2025-12-10 14:48:20 +01:00

53 lines
1.3 KiB
Nix

{
mkTarget,
config,
lib,
...
}:
mkTarget {
name = "limine";
humanName = "Limine";
options.useWallpaper = config.lib.stylix.mkEnableWallpaper "Limine" true;
config = [
(
{ colors }:
{
boot.loader.limine.style = with colors; {
graphicalTerminal = {
palette = "${base05};${base08};${base0B};${base0A};${base0D};${base0E};${base0C};${base00}";
brightPalette = "${base00};${base08};${base0B};${base0A};${base0D};${base0E};${base0C};${base05}";
background = base00;
foreground = base05;
brightBackground = base05;
brightForeground = base0A;
};
backdrop = base00;
};
}
)
(
{ cfg, image }:
{
boot.loader.limine.style.wallpapers = lib.mkIf cfg.useWallpaper [ image ];
}
)
(
{ imageScalingMode }:
{
# Stylix supports more scaling modes than limine supports.
boot.loader.limine.style.wallpaperStyle =
{
"stretch" = "stretched";
"fill" = "stretched";
"fit" = "stretched";
"center" = "centered";
"tile" = "tiled";
inherit null;
}
.${imageScalingMode};
}
)
];
}