1
0
Fork 0

System: futzing with bootloader modules

This commit is contained in:
Aires 2024-12-09 16:06:14 -05:00
parent a78b7f55e1
commit dd865b43a3
6 changed files with 38 additions and 40 deletions

View file

@ -51,7 +51,6 @@ in
boot.initrd = {
# Enable modules and support for TPM auto-unlocking
systemd.enable = true;
availableKernelModules = [ "tpm_crb" ];
kernelModules = [ "tpm_crb" ];
};
# After installing and rebooting, set it up via https://wiki.archlinux.org/title/Systemd-cryptenroll#Trusted_Platform_Module

View file

@ -62,10 +62,16 @@ in
message = "Please specify your boot partition.";
}
];
boot.initrd.luks.devices.${decryptPart} = {
device = cfg.partitions.luks;
# Enable TPM auto-unlocking if configured
crypttabExtraOpts = lib.mkIf config.${namespace}.bootloader.tpm2.enable [ "tpm2-device=auto" ];
boot = {
supportedFilesystems = [ "btrfs" ];
initrd = {
availableKernelModules = [ "btrfs" ];
luks.devices.${decryptPart} = {
device = cfg.partitions.luks;
# Enable TPM auto-unlocking if configured
crypttabExtraOpts = lib.mkIf config.${namespace}.bootloader.tpm2.enable [ "tpm2-device=auto" ];
};
};
};
fileSystems = {
"/" = {

View file

@ -8,22 +8,17 @@ in
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
supportedFilesystems = [ "btrfs" ];
kernelModules = [ "kvm-amd" ];
initrd = {
supportedFilesystems = [ "btrfs" ];
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
"btrfs"
];
kernelModules = [ ];
};
initrd.availableKernelModules = [
"kvm-amd"
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
# Enable support for building ARM64 packages
binfmt.emulatedSystems = [ "aarch64-linux" ];

View file

@ -18,6 +18,8 @@ in
# NOTE: Uncomment to use a default kernel and skip full kernel rebuilds
#kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
kernelModules = [ "kvm-intel" ];
# NOTE: Loading the camera driver results in a kernel panic on 6.10 kernels. See https://github.com/linux-surface/linux-surface/issues/1516
blacklistedKernelModules = [
"intel-ipu6"

View file

@ -15,20 +15,18 @@ in
# Configure the kernel.
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
kernelModules = [ "kvm-amd" ];
# Hardware defaults detected by nixos-generate-configuration
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
};
kernelModules = [ "kvm-amd" ];
initrd.availableKernelModules = [
"kvm-amd"
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
};
# Configure the main filesystem.

View file

@ -14,15 +14,13 @@ in
# Configure the kernel.
boot = {
# Run `nixos-generate-config --no-filesystems` to generate a baseline hardware configuration.
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
};
initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ ];
};