diff --git a/src/functions/base.rs b/src/functions/base.rs index 689213b..7969f29 100755 --- a/src/functions/base.rs +++ b/src/functions/base.rs @@ -1,5 +1,6 @@ use crate::internal::exec::*; use crate::internal::*; +use crate::internal::files::append_file; use std::path::PathBuf; pub fn install_base_packages() { @@ -38,7 +39,7 @@ pub fn genfstab() { } pub fn install_bootloader_efi(efidir: PathBuf) { - install::install(vec!["grub", "efibootmgr", "grub-btrfs"]); + install::install(vec!["grub", "efibootmgr", "grub-btrfs", "crystal-grub-theme"]); let efidir = std::path::Path::new("/mnt").join(efidir); let efi_str = efidir.to_str().unwrap(); if !std::path::Path::new(&format!("/mnt{efi_str}")).exists() { @@ -67,6 +68,10 @@ pub fn install_bootloader_efi(efidir: PathBuf) { ), "install grub as efi without --removable", ); + files_eval( + append_file("/mnt/etc/default/grub", "GRUB_THEME=\"/usr/share/grub/themes/crystal/theme.txt\""), + "enable crystal grub theme" + ); exec_eval( exec_chroot( "grub-mkconfig", @@ -77,7 +82,7 @@ pub fn install_bootloader_efi(efidir: PathBuf) { } pub fn install_bootloader_legacy(device: PathBuf) { - install::install(vec!["grub", "grub-btrfs"]); + install::install(vec!["grub", "grub-btrfs", "crystal-grub-theme"]); if !device.exists() { crash(format!("The device {device:?} does not exist"), 1); } @@ -89,6 +94,10 @@ pub fn install_bootloader_legacy(device: PathBuf) { ), "install grub as legacy", ); + files_eval( + append_file("/mnt/etc/default/grub", "GRUB_THEME=\"/usr/share/grub/themes/crystal/theme.txt\""), + "enable crystal grub theme" + ); exec_eval( exec_chroot( "grub-mkconfig",