Files
nixos/Droidnix/generated/hosts/traveldroid/boot.nix
T
2026-03-22 21:43:29 +00:00

46 lines
1.2 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
# Regenerate GRUB config so new kernels show up
grub-mkconfig -o /boot/grub/grub.cfg
echo "GRUB Catppuccin Mocha theme installed and config updated."
'';
};
}