NixOS-Configs/hosts/common/boot.nix
2026-05-16 22:36:47 -05:00

29 lines
730 B
Nix

{ config, lib, pkgs, ... }: {
# Common boot configuration
boot = {
binfmt.emulatedSystems = lib.optionals (pkgs.stdenv.hostPlatform.system != "aarch64-linux") [ "aarch64-linux" ];
loader =
if config.system != "aarch64-linux"
then {
systemd-boot = {enable = true;};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
}
else {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
# Plymouth for boot splash
plymouth.enable = true;
# Kernel parameters
kernel = {sysctl = {"vm.swappiness" = 10;};};
# Console settings
consoleLogLevel = 0;
initrd.verbose = false;
};
}