67 lines
1.6 KiB
Nix
67 lines
1.6 KiB
Nix
{ pkgs, config, lib, flakeRoot, ... }:
|
|
|
|
let
|
|
# Paths for theming
|
|
grubThemeDir = "/boot/grub/themes/catppuccin-mocha";
|
|
grubThemeFile = "${grubThemeDir}/theme.txt";
|
|
plymouthThemeDir = "/usr/share/plymouth/themes/catppuccin";
|
|
in
|
|
{
|
|
boot = {
|
|
# Kernel and initrd settings
|
|
initrd = {
|
|
verbose = false;
|
|
kernelModules = [];
|
|
};
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
kernelParams = [ "quiet" "udev.log_level=3" "systemd.show_status=auto" ];
|
|
consoleLogLevel = 3;
|
|
|
|
supportedFilesystems = [ "ntfs" ];
|
|
|
|
# GRUB loader
|
|
loader = {
|
|
grub = {
|
|
enable = true;
|
|
devices = [ "/dev/nvme0n1" ]; # <- replace with your real boot disk
|
|
useOSProber = true;
|
|
theme = grubThemeFile; # point GRUB to our theme
|
|
};
|
|
timeout = 5;
|
|
};
|
|
|
|
# Plymouth splashscreen
|
|
plymouth = {
|
|
enable = true;
|
|
theme = "rings";
|
|
themePackages = with pkgs; [
|
|
(adi1090x-plymouth-themes.override {
|
|
selected_themes = [ "rings" ];
|
|
})
|
|
];
|
|
};
|
|
};
|
|
|
|
# Activation script: write Catppuccin GRUB theme
|
|
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."
|
|
'';
|
|
};
|
|
}
|