Files
nixos/Droidnix/generated/hosts/traveldroid/boot.nix
T
2026-03-24 10:47:23 +00:00

89 lines
1.9 KiB
Nix

{ config, pkgs, lib, flakeRoot, ... }:
let
hostname = config.networking.hostName or "traveldroid";
# Build GRUB theme from your assets
grubTheme = pkgs.stdenv.mkDerivation {
name = "droidnix-grub-theme";
src = "${flakeRoot}/assets/traveldroid/theming/boot";
installPhase = ''
mkdir -p $out
# GRUB expects this exact name
cp theme.txt $out/theme.txt
# Assets
cp background.png $out/
'';
};
in
{
#################################
# Bootloader (UEFI + GRUB)
#################################
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = true;
#device = "nodev";
useOSProber = true;
# Keep multiple generations (fixes menu issue)
configurationLimit = 25;
# Fully declarative theme
theme = grubTheme;
};
timeout = 5;
};
#################################
# Kernel / initrd
#################################
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
"quiet"
"splash"
"udev.log_level=3"
"rd.systemd.show_status=false"
];
boot.consoleLogLevel = 0;
boot.initrd.systemd.enable = true;
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.kernelModules = [ "kvm-intel" ];
#################################
# Plymouth
#################################
boot.plymouth = {
enable = true;
theme = "rings";
themePackages = [
(pkgs.adi1090x-plymouth-themes.override {
selected_themes = [ "rings" ];
})
];
};
#################################
# CPU / platform
#################################
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}