42 lines
982 B
Nix
42 lines
982 B
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
let
|
||
|
zfs_arc_max = toString (6 * 1024 * 1024 * 1024);
|
||
|
in {
|
||
|
boot = {
|
||
|
initrd = {
|
||
|
luks.devices = {
|
||
|
"cryptroot" = {
|
||
|
preLVM = true;
|
||
|
keyFile = "/keyfile0.bin";
|
||
|
allowDiscards = true;
|
||
|
bypassWorkqueues = config.deviceSpecific.isSSD;
|
||
|
fallbackToPassword = true;
|
||
|
};
|
||
|
};
|
||
|
secrets = {
|
||
|
"keyfile0.bin" = "/etc/secrets/keyfile0.bin";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
loader = {
|
||
|
systemd-boot = {
|
||
|
enable = true;
|
||
|
editor = false;
|
||
|
configurationLimit = 10;
|
||
|
};
|
||
|
efi.canTouchEfiVariables = false;
|
||
|
efi.efiSysMountPoint = "/boot/efi";
|
||
|
generationsDir.copyKernels = true;
|
||
|
};
|
||
|
|
||
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||
|
kernelPackages = pkgs.linuxPackages_lqx;
|
||
|
kernelParams = [
|
||
|
"zfs.metaslab_lba_weighting_enabled=0"
|
||
|
"zfs.zfs_arc_max=${zfs_arc_max}"
|
||
|
];
|
||
|
tmpOnTmpfs = true;
|
||
|
tmpOnTmpfsSize = "32G";
|
||
|
};
|
||
|
}
|