36 lines
792 B
Nix
36 lines
792 B
Nix
{
|
|
pkgs,
|
|
system,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
isArm = ("aarch64-linux" == system) || ("aarch64-darwin" == system);
|
|
in
|
|
{
|
|
boot = {
|
|
kernelParams = [
|
|
"quiet"
|
|
];
|
|
|
|
binfmt = lib.mkIf isArm {
|
|
registrations."x86_64-linux" = {
|
|
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'';
|
|
mask = ''\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
|
|
openBinary = true;
|
|
interpreter = "${lib.getExe pkgs.box64}";
|
|
preserveArgvZero = true;
|
|
matchCredentials = true;
|
|
fixBinary = false;
|
|
};
|
|
};
|
|
|
|
supportedFilesystems = [ "bcachefs" ];
|
|
|
|
consoleLogLevel = lib.mkForce 3;
|
|
bootspec.enable = (!isArm);
|
|
};
|
|
|
|
zramSwap.enable = lib.mkDefault true;
|
|
}
|