Regenerated
This commit is contained in:
+58
-46
@@ -267,71 +267,83 @@ in {
|
||||
|
||||
** =generated/hosts/traveldroid/boot.nix=
|
||||
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/boot.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
{ pkgs, config, lib, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Path where GRUB theme will live
|
||||
# Paths for theming
|
||||
grubThemeDir = "/boot/grub/themes/catppuccin-mocha";
|
||||
grubThemeFile = "${grubThemeDir}/theme.txt";
|
||||
|
||||
# Path to your custom splash image
|
||||
bootAssets = "${flakeRoot}/assets/system/theming/boot";
|
||||
|
||||
# Catppuccin Mocha color palette
|
||||
catppuccin = {
|
||||
base = "#1e1e2e";
|
||||
mantle = "#181825";
|
||||
crust = "#11111b";
|
||||
text = "#cdd6f4";
|
||||
rosewater = "#f5e0dc";
|
||||
flamingo = "#f2cdcd";
|
||||
pink = "#f5c2e7";
|
||||
mauve = "#cba6f7";
|
||||
red = "#f38ba8";
|
||||
maroon = "#eba0ac";
|
||||
peach = "#fab387";
|
||||
yellow = "#f9e2af";
|
||||
green = "#a6e3a1";
|
||||
teal = "#94e2d5";
|
||||
sky = "#89dceb";
|
||||
sapphire = "#74c7ec";
|
||||
blue = "#89b4fa";
|
||||
lavender = "#b4befe";
|
||||
};
|
||||
plymouthThemeDir = "/usr/share/plymouth/themes/catppuccin";
|
||||
plymouthSplash = "${flakeRoot}/assets/system/theming/boot/mocha.webp";
|
||||
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;
|
||||
|
||||
# Filesystems supported at boot
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
# GRUB loader
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
devices = [ "/dev/nvme0n1" ]; # <- must point to real disk
|
||||
useOSProber = true;
|
||||
};
|
||||
boot.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Plymouth splashscreen
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
themePackages = with pkgs; [
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "spinner" ]; # default, overridden below
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Activation script: write Catppuccin GRUB theme
|
||||
system.activationScripts.grubTheme = {
|
||||
text = ''
|
||||
echo "Installing GRUB Catppuccin Mocha theme..."
|
||||
|
||||
# Create theme directory
|
||||
mkdir -p ${grubThemeDir}
|
||||
|
||||
# Generate theme.txt automatically
|
||||
# Write a simple theme.txt using Catppuccin Mocha colors
|
||||
cat > ${grubThemeFile} <<EOF
|
||||
# Catppuccin Mocha GRUB theme
|
||||
desktop-color = ${catppuccin.base}
|
||||
normal-color = ${catppuccin.text}
|
||||
selected-item-color = ${catppuccin.rosewater}
|
||||
selected-item-highlight-color = ${catppuccin.pink}
|
||||
EOF
|
||||
# Catppuccin Mocha GRUB theme
|
||||
desktop-color = #1e1e2e
|
||||
normal-color = #cdd6f4
|
||||
selected-item-color = #f5e0dc
|
||||
selected-item-highlight-color = #f5c2e7
|
||||
EOF
|
||||
|
||||
# Copy background if exists
|
||||
if [ -f "${bootAssets}/grub-bg.png" ]; then
|
||||
cp "${bootAssets}/grub-bg.png" "${grubThemeDir}/background.png"
|
||||
# Copy background image if it exists
|
||||
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 at ${grubThemeDir}."
|
||||
echo "GRUB Catppuccin Mocha theme installed."
|
||||
'';
|
||||
};
|
||||
|
||||
# Optionally configure Plymouth using the same folder
|
||||
# Activation script: install Plymouth splash image
|
||||
system.activationScripts.plymouthTheme = {
|
||||
text = ''
|
||||
if [ -f "${bootAssets}/mocha.webp" ]; then
|
||||
mkdir -p /usr/share/plymouth/themes/catppuccin
|
||||
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
|
||||
if [ -f "${plymouthSplash}" ]; then
|
||||
mkdir -p ${plymouthThemeDir}
|
||||
cp "${plymouthSplash}" "${plymouthThemeDir}/splash.png"
|
||||
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth \
|
||||
${plymouthThemeDir}/splash.png 100
|
||||
echo "Plymouth Catppuccin splash installed."
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user