62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
boot = {
|
|
loader = {
|
|
grub = {
|
|
enable = true;
|
|
efiSupport = true;
|
|
efiInstallAsRemovable = true;
|
|
enableCryptodisk = true;
|
|
device = "nodev";
|
|
extraConfig = ''
|
|
source (crypto0)/os/arch/boot/grub/grub.cfg
|
|
'';
|
|
};
|
|
efi.efiSysMountPoint = "/boot/efi";
|
|
};
|
|
initrd = {
|
|
luks = {
|
|
devices.safe = {
|
|
device = "/dev/disk/by-uuid/16fe9b20-c31d-4b51-9b06-670713597c07";
|
|
preLVM = true;
|
|
bypassWorkqueues = true;
|
|
};
|
|
};
|
|
systemd = {
|
|
initrdBin = with pkgs; [
|
|
cryptsetup
|
|
];
|
|
};
|
|
kernelModules = [
|
|
"cryptd"
|
|
"uas"
|
|
"usbcore"
|
|
"usb_storage"
|
|
"vfat"
|
|
"nls_cp437"
|
|
"nls_iso8859_1"
|
|
];
|
|
availableKernelModules = [
|
|
"xhci_pci"
|
|
"nvme"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"rtsx_pci_sdmmc"
|
|
"dm_crypt"
|
|
"crypto_user"
|
|
];
|
|
supportedFilesystems = [
|
|
"btrfs"
|
|
"vfat"
|
|
"luks"
|
|
];
|
|
};
|
|
kernel.sysctl."kernel.sysrq" = 1;
|
|
};
|
|
}
|