2023-04-16 13:11:09 -07:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.boot.loader.grub.catppuccin;
|
|
|
|
|
|
|
|
theme = with pkgs;
|
|
|
|
let
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "catppuccin";
|
|
|
|
repo = "grub";
|
|
|
|
rev = "803c5df0e83aba61668777bb96d90ab8f6847106";
|
|
|
|
sha256 = "sha256-/bSolCta8GCZ4lP0u5NVqYQ9Y3ZooYCNdTwORNvR7M0=";
|
|
|
|
};
|
2023-04-18 17:01:16 -07:00
|
|
|
in
|
|
|
|
runCommand "catppuccin-grub-theme" { } ''
|
2023-04-16 13:11:09 -07:00
|
|
|
mkdir -p "$out"
|
|
|
|
cp -r ${src}/src/catppuccin-${cfg.flavour}-grub-theme/* "$out"/
|
|
|
|
'';
|
2023-04-18 17:01:16 -07:00
|
|
|
in
|
|
|
|
{
|
2023-04-17 18:50:53 -07:00
|
|
|
options.boot.loader.grub.catppuccin =
|
|
|
|
lib.ctp.mkCatppuccinOpt "grub" config;
|
2023-04-16 13:11:09 -07:00
|
|
|
|
|
|
|
config.boot.loader.grub = with lib; mkIf cfg.enable {
|
|
|
|
font = "${theme}/font.pf2";
|
|
|
|
splashImage = "${theme}/background.png";
|
|
|
|
inherit theme;
|
|
|
|
};
|
|
|
|
}
|