Files
nixos/Droidnix/generated/hosts/traveldroid/boot.nix
T
2026-05-03 21:54:31 +02:00

90 lines
2.1 KiB
Nix

# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ config, pkgs, lib, flakeRoot, ... }:
{
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot";
timeout = 5;
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
"quiet"
"splash"
"udev.log_level=3"
"rd.systemd.show_status=false"
# Sleep / power management
"mem_sleep_default=deep"
"acpi_osi=Linux"
"acpi_backlight=native"
# Intel GPU
"i915.enable_psr=0"
"i915.enable_psr2_sel_fetch=0"
# NVMe
"nvme.noacpi=1"
# Audio
"snd_sof_pci.quirk_map=0x1025141d:0"
];
boot.extraModprobeConfig = ''
options snd_hda_intel power_save=0
options snd-hda-intel dmic_detect=0
options snd-hda-intel model=alc295-disable-dac3
'';
boot.blacklistedKernelModules = [
"snd_soc_skl_hda_dsp"
"snd_sof_pci_intel_cnl"
"snd_sof_pci"
];
boot.consoleLogLevel = 0;
# SUGGESTION: consider enabling initrd systemd — better plymouth integration
# and faster boot. Test it — it works well on most modern NixOS setups.
boot.initrd.systemd.enable = true;
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.kernelModules = [
"kvm-intel" # QEMU/KVM virtualisation
];
boot.plymouth.enable = true;
hardware.enableAllFirmware = true;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# Power management
powerManagement.enable = true;
services.logind.settings.Login = {
HandleSleepKey = "ignore";
HandleSleepKeyLongPress = "ignore";
};
services.thermald.enable = true;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "low-power";
};
};
}