Files
nixos/Droidnix/generated/hosts/traveldroid/boot.nix
T
2026-03-24 08:08:50 +00:00

101 lines
2.2 KiB
Nix

{ config, pkgs, lib, flakeRoot, ... }:
let
hostname = config.networking.hostName or "traveldroid";
# Asset paths
themeSrc = "${flakeRoot}/assets/traveldroid/theming/boot";
in
{
#################################
# Bootloader (UEFI + GRUB)
#################################
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
enable = true;
efiSupport = true;
device = "nodev";
useOSProber = true;
# 🔥 IMPORTANT for menu updates
configurationLimit = 10;
# Theme + background
splashImage = "/boot/grub/themes/droidnix/background.png";
extraConfig = ''
set theme=/boot/grub/themes/droidnix/theme.txt
'';
};
timeout = 5;
};
#################################
# Copy GRUB theme assets
#################################
environment.etc = {
# Copy theme into /boot (via activation)
"grub/themes/droidnix/background.png".source =
"${themeSrc}/background.png";
"grub/themes/droidnix/theme.txt".source =
"${themeSrc}/theming.txt";
};
#################################
# 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";
#################################
# State version
#################################
system.stateVersion = "26.05";
}