Files
nixos/Droidnix/generated/hosts/traveldroid/boot.nix
T
2026-03-23 06:11:36 +00:00

42 lines
1.1 KiB
Nix

{ pkgs, config, lib, flakeRoot, ... }:
let
grubThemeDir = "/boot/grub/themes/catppuccin-mocha";
grubThemeFile = "${grubThemeDir}/theme.txt";
in
{
boot.loader.grub = {
enable = true;
efiSupport = true;
devices = [ "nodev" ];
useOSProber = true;
theme = grubThemeFile;
timeout = 5;
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "quiet" "udev.log_level=3" "systemd.show_status=auto" ];
boot.consoleLogLevel = 3;
boot.supportedFilesystems = [ "ntfs" ];
# Activation script for theme + background
system.activationScripts.grubTheme = {
text = ''
mkdir -p ${grubThemeDir}
cat > ${grubThemeFile} <<EOF
# Catppuccin Mocha GRUB theme
desktop-color = #1e1e2e
normal-color = #cdd6f4
selected-item-color = #f5e0dc
selected-item-highlight-color = #f5c2e7
EOF
if [ -f "${flakeRoot}/assets/system/theming/boot/background.png" ]; then
cp "${flakeRoot}/assets/system/theming/boot/background.png" "${grubThemeDir}/background.png"
fi
echo "GRUB Catppuccin Mocha theme installed and config updated."
'';
};
}