mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
整理内核模块
This commit is contained in:
@@ -10,21 +10,12 @@ inputs:
|
||||
# initrd, luks
|
||||
boot.initrd =
|
||||
{
|
||||
systemd.enable = true;
|
||||
# modules in initrd
|
||||
# modprobe --show-depends
|
||||
availableKernelModules =
|
||||
[
|
||||
"ahci" "bfq" "i915" "intel_cstate" "nls_cp437" "nls_iso8859-1" "nvidia" "nvidia_drm" "nvidia_modeset"
|
||||
"nvidia_uvm" "nvme" "sr_mod" "usbhid" "usb_storage" "virtio_blk" "virtio_pci" "xhci_pci"
|
||||
]
|
||||
# speed up luks decryption
|
||||
++ [ "aesni_intel" "cryptd" "crypto_simd" "libaes" ];
|
||||
[ "i915" "intel_cstate" "nvidia" "nvidia_drm" "nvidia_modeset" "nvidia_uvm" "aesni_intel" ];
|
||||
systemd.services."systemd-cryptsetup@swap" =
|
||||
{
|
||||
before = [ "systemd-cryptsetup@root.service" ];
|
||||
overrideStrategy = "asDropin";
|
||||
};
|
||||
};
|
||||
|
||||
# impermanence
|
||||
|
||||
@@ -12,7 +12,13 @@ inputs:
|
||||
config = let inherit (inputs.lib) mkMerge mkIf; inherit (inputs.localLib) mkConditional; in mkMerge
|
||||
[
|
||||
# generic
|
||||
{ boot.loader.grub = { enable = true; useOSProber = false; };}
|
||||
{
|
||||
boot =
|
||||
{
|
||||
loader.grub = { enable = true; useOSProber = false; };
|
||||
initrd.systemd.enable = true;
|
||||
};
|
||||
}
|
||||
# grub.timeout
|
||||
{ boot.loader.timeout = inputs.config.nixos.boot.grub.timeout; }
|
||||
# grub.entries
|
||||
|
||||
@@ -17,6 +17,11 @@ inputs:
|
||||
{
|
||||
boot =
|
||||
{
|
||||
initrd.availableKernelModules =
|
||||
[
|
||||
"ahci" "bfq" "nls_cp437" "nls_iso8859-1" "nvme" "sr_mod" "usbhid" "usb_storage" "virtio_blk" "virtio_pci"
|
||||
"xhci_pci" "cryptd" "crypto_simd" "libaes"
|
||||
];
|
||||
kernelParams = [ "delayacct" "acpi_osi=Linux" ];
|
||||
kernelPackages = inputs.pkgs.linuxPackagesFor (inputs.pkgs.linuxPackages_xanmod.kernel.override rec
|
||||
{
|
||||
@@ -79,3 +84,5 @@ inputs:
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
# modprobe --show-depends
|
||||
|
||||
Reference in New Issue
Block a user