2024-08-13 17:48:04 +00:00
|
|
|
{
|
|
|
|
boot.initrd.availableKernelModules = [ "ahci" "ehci_pci" "usb_storage" "usbhid" "sd_mod" ];
|
|
|
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
boot.initrd.systemd.enable = true;
|
|
|
|
|
|
|
|
boot.initrd.services.lvm.enable = true;
|
|
|
|
|
|
|
|
boot.kernelParams = [
|
|
|
|
"console=tty1"
|
|
|
|
"console=ttyS0,115200"
|
|
|
|
];
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-label/root";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/BOOT";
|
|
|
|
fsType = "vfat";
|
|
|
|
options = [ "fmask=0022" "dmask=0022" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "/swapfile";
|
|
|
|
size = 20 * 1024; # 50GiB
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
zramSwap = {
|
|
|
|
enable = true;
|
|
|
|
memoryPercent = 25;
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.useNetworkd = true;
|
|
|
|
|
|
|
|
systemd.network = {
|
|
|
|
netdevs = {
|
|
|
|
"40-uplink" = {
|
|
|
|
netdevConfig = {
|
|
|
|
Kind = "bond";
|
|
|
|
Name = "uplink";
|
|
|
|
};
|
|
|
|
bondConfig = {
|
|
|
|
Mode = "802.3ad";
|
|
|
|
TransmitHashPolicy = "layer3+4";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
networks = {
|
|
|
|
"40-eno1" = {
|
|
|
|
name = "eno1";
|
|
|
|
bond = [ "uplink" ];
|
|
|
|
};
|
|
|
|
"40-eno2" = {
|
|
|
|
name = "eno2";
|
|
|
|
bond = [ "uplink" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
networking.interfaces.uplink.ipv6.addresses = [
|
|
|
|
{ address = "2a01:584:11::1:11"; prefixLength = 64; }
|
|
|
|
];
|
|
|
|
networking.defaultGateway6 = { interface = "uplink"; address = "2a01:584:11::1"; };
|
2024-08-16 07:33:48 +00:00
|
|
|
|
|
|
|
services.coredns = {
|
|
|
|
enable = true;
|
|
|
|
config = ''
|
|
|
|
. {
|
|
|
|
bind lo
|
|
|
|
forward . 2001:4860:4860::6464
|
|
|
|
template ANY A { rcode NOERROR }
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
services.resolved.enable = false;
|
|
|
|
networking.resolvconf.useLocalResolver = true;
|
2024-08-13 17:48:04 +00:00
|
|
|
}
|