dotfiles/hardware/hosts/tanker.nix

52 lines
1.2 KiB
Nix
Raw Normal View History

2023-07-16 14:28:53 +00:00
{ pkgs, lib, config, modulesPath, ... }:
{
imports = [
2023-07-16 14:28:53 +00:00
"${modulesPath}/installer/scan/not-detected.nix"
../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-09-12 22:00:21 +00:00
swraid = {
enable = true;
mdadmConf = ''
MAILADDR daniel+tanker@kempkens.io
'';
};
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;
"net.ipv4.tcp_timestamps" = 1;
"net.ipv4.tcp_window_scaling" = 1;
2023-09-04 10:45:06 +00:00
"net.ipv4.tcp_fastopen" = 3;
"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-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";
}