Regenerated
This commit is contained in:
+18
-40
@@ -270,12 +270,16 @@ in {
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Path to store GRUB theme
|
||||
# Path where GRUB theme will live
|
||||
grubThemeDir = "/boot/grub/themes/catppuccin-mocha";
|
||||
grubThemeFile = "${grubThemeDir}/theme.txt";
|
||||
|
||||
# Catppuccin Mocha colors
|
||||
# Path to your custom splash image
|
||||
bootAssets = "${flakeRoot}/assets/system/theming/boot";
|
||||
|
||||
# Catppuccin Mocha color palette
|
||||
catppuccin = {
|
||||
base = "#1e1e2e"; # background
|
||||
base = "#1e1e2e";
|
||||
mantle = "#181825";
|
||||
crust = "#11111b";
|
||||
text = "#cdd6f4";
|
||||
@@ -294,42 +298,16 @@ let
|
||||
blue = "#89b4fa";
|
||||
lavender = "#b4befe";
|
||||
};
|
||||
|
||||
# Helper to recursively write theme files
|
||||
grubThemeFile = "${grubThemeDir}/theme.txt";
|
||||
|
||||
in
|
||||
{
|
||||
boot = {
|
||||
initrd = {
|
||||
verbose = false;
|
||||
kernelModules = [];
|
||||
};
|
||||
|
||||
extraModulePackages = [];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [ "quiet" ];
|
||||
consoleLogLevel = 0;
|
||||
|
||||
plymouth.enable = true;
|
||||
plymouth.theme = "spinner"; # default theme; we can override with custom image
|
||||
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# GRUB theme setup using activation script
|
||||
system.activationScripts.grubTheme = {
|
||||
text = ''
|
||||
echo "Installing GRUB Catppuccin Mocha theme..."
|
||||
|
||||
# Create theme directory
|
||||
mkdir -p ${grubThemeDir}
|
||||
|
||||
# Write GRUB theme using Catppuccin colors
|
||||
# Generate theme.txt automatically
|
||||
cat > ${grubThemeFile} <<EOF
|
||||
# Catppuccin Mocha GRUB theme
|
||||
desktop-color = ${catppuccin.base}
|
||||
@@ -338,21 +316,21 @@ in
|
||||
selected-item-highlight-color = ${catppuccin.pink}
|
||||
EOF
|
||||
|
||||
# Optional: copy a matching PNG for background if exists in flake assets
|
||||
if [ -f "${flakeRoot}/assets/grub-bg.png" ]; then
|
||||
cp "${flakeRoot}/assets/grub-bg.png" "${grubThemeDir}/background.png"
|
||||
# Copy background if exists
|
||||
if [ -f "${bootAssets}/grub-bg.png" ]; then
|
||||
cp "${bootAssets}/grub-bg.png" "${grubThemeDir}/background.png"
|
||||
fi
|
||||
|
||||
echo "GRUB Catppuccin Mocha theme installed."
|
||||
echo "GRUB Catppuccin Mocha theme installed at ${grubThemeDir}."
|
||||
'';
|
||||
};
|
||||
|
||||
# Optionally, configure Plymouth to use your Catppuccin splash image
|
||||
# Optionally configure Plymouth using the same folder
|
||||
system.activationScripts.plymouthTheme = {
|
||||
text = ''
|
||||
if [ -f "${flakeRoot}/assets/system/theming/mocha.webp" ]; then
|
||||
if [ -f "${bootAssets}/mocha.webp" ]; then
|
||||
mkdir -p /usr/share/plymouth/themes/catppuccin
|
||||
cp "${flakeRoot}//assets/system/theming/mocha.webp" /usr/share/plymouth/themes/catppuccin/splash.png
|
||||
cp "${bootAssets}/mocha.webp" /usr/share/plymouth/themes/catppuccin/splash.png
|
||||
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/catppuccin/splash.png 100
|
||||
fi
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user