2023-07-16 14:28:53 +00:00
|
|
|
{ pkgs, lib, config, modulesPath, ... }:
|
2023-06-21 12:21:40 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
2023-07-16 14:28:53 +00:00
|
|
|
"${modulesPath}/installer/scan/not-detected.nix"
|
2023-06-21 12:21:40 +00: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 14:28:53 +00:00
|
|
|
kernelModules = [ "kvm-amd" "tls" ];
|
2023-06-21 12:21:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
|
|
|
|
kernelModules = [ "tcp_bbr" ];
|
|
|
|
|
|
|
|
kernel.sysctl = {
|
|
|
|
"net.core.default_qdisc" = "fq";
|
|
|
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
2023-09-04 10:45:06 +00:00
|
|
|
"net.ipv4.tcp_syncookies" = 1;
|
2023-06-21 12:21:40 +00:00
|
|
|
"net.ipv4.tcp_timestamps" = 1;
|
|
|
|
"net.ipv4.tcp_window_scaling" = 1;
|
2023-09-04 10:45:06 +00:00
|
|
|
"net.ipv4.tcp_fastopen" = 3;
|
2023-06-21 12:21:40 +00:00
|
|
|
"net.core.rmem_max" = 2500000;
|
2023-09-05 09:56:31 +00:00
|
|
|
"net.core.wmem_max" = 2500000;
|
2023-06-23 18:08:22 +00:00
|
|
|
"vm.overcommit_memory" = 1;
|
2023-06-21 12:21:40 +00:00
|
|
|
};
|
|
|
|
};
|
2023-06-29 09:05:23 +00:00
|
|
|
|
2023-07-16 14:28:53 +00:00
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
2023-06-29 09:05:23 +00:00
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
2023-06-21 12:21:40 +00:00
|
|
|
}
|