Files
nixos/Droidnix/generated/hosts/traveldroid/boot.nix
T
2026-03-24 11:06:43 +00:00

82 lines
1.9 KiB
Nix

{ config, pkgs, lib, flakeRoot, ... }:
let
hostname = config.networking.hostName or "traveldroid";
# GRUB theme derivation
grubTheme = pkgs.stdenv.mkDerivation {
name = "droidnix-grub-theme";
src = "${flakeRoot}/assets/traveldroid/theming/boot";
installPhase = ''
mkdir -p $out
cp theme.txt $out/theme.txt
cp background.png $out/
'';
};
in
{
#################################
# Bootloader (UEFI + GRUB)
#################################
boot.loader = {
efi = {
canTouchEfiVariables = false; # must be false if using efiInstallAsRemovable
efiSysMountPoint = "/boot";
};
grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = true;
devices = [ "nodev" ]; # for UEFI-only installation
useOSProber = true;
configurationLimit = 25;
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";
}