2023-07-16 16:28:53 +02:00
|
|
|
{ pkgs, lib, config, modulesPath, ... }:
|
2023-06-21 14:21:40 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
2023-07-16 16:28:53 +02:00
|
|
|
"${modulesPath}/installer/scan/not-detected.nix"
|
2023-06-21 14:21:40 +02:00
|
|
|
../disko/tanker.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader.grub = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
copyKernels = true;
|
|
|
|
devices = [ "/dev/nvme0n1" "/dev/nvme1n1" ];
|
|
|
|
efiInstallAsRemovable = true;
|
|
|
|
efiSupport = true;
|
|
|
|
fsIdentifier = "uuid";
|
|
|
|
};
|
|
|
|
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ];
|
2023-07-16 16:28:53 +02:00
|
|
|
kernelModules = [ "kvm-amd" "tls" ];
|
2023-06-21 14:21:40 +02:00
|
|
|
};
|
|
|
|
|
2023-09-13 00:00:21 +02:00
|
|
|
swraid = {
|
|
|
|
enable = true;
|
|
|
|
mdadmConf = ''
|
|
|
|
MAILADDR daniel+tanker@kempkens.io
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-11-06 20:28:43 +01:00
|
|
|
kernelPackages = pkgs.linuxPackages;
|
2023-06-21 14:21:40 +02:00
|
|
|
kernelModules = [ "tcp_bbr" ];
|
|
|
|
|
|
|
|
kernel.sysctl = {
|
|
|
|
"net.core.default_qdisc" = "fq";
|
|
|
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
2023-09-04 12:45:06 +02:00
|
|
|
"net.ipv4.tcp_syncookies" = 1;
|
2023-06-21 14:21:40 +02:00
|
|
|
"net.ipv4.tcp_timestamps" = 1;
|
|
|
|
"net.ipv4.tcp_window_scaling" = 1;
|
2023-09-04 12:45:06 +02:00
|
|
|
"net.ipv4.tcp_fastopen" = 3;
|
2023-06-21 14:21:40 +02:00
|
|
|
"net.core.rmem_max" = 2500000;
|
2023-09-05 11:56:31 +02:00
|
|
|
"net.core.wmem_max" = 2500000;
|
2024-05-01 19:16:18 +02:00
|
|
|
"vm.overcommit_memory" = lib.mkForce 1;
|
2023-06-21 14:21:40 +02:00
|
|
|
};
|
|
|
|
};
|
2023-06-29 11:05:23 +02:00
|
|
|
|
2023-07-16 16:28:53 +02:00
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
2023-06-29 11:05:23 +02:00
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
2023-06-21 14:21:40 +02:00
|
|
|
}
|