2023-02-25 13:45:21 +00:00
|
|
|
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
|
|
|
# and may be overwritten by future invocations. Please make changes
|
|
|
|
|
# to /etc/nixos/configuration.nix instead.
|
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
|
|
|
|
boot.kernelModules = ["kvm-intel"];
|
|
|
|
|
boot.extraModulePackages = [];
|
|
|
|
|
boot.extraModprobeConfig = "options kvm_intel nested=1";
|
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_6_1;
|
|
|
|
|
boot.kernelParams = [ "ip=80.244.242.2::80.244.242.1:255.255.255.248:chonk::off" ];
|
2023-02-25 13:45:21 +00:00
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
boot.loader.grub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
device = "/dev/disk/by-id/usb-SanDisk_Cruzer_Blade_03025429121421051300-0:0";
|
|
|
|
|
};
|
2023-02-25 13:45:21 +00:00
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
boot.supportedFilesystems = [ "zfs" ];
|
2023-02-25 13:45:21 +00:00
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
boot.initrd = {
|
|
|
|
|
systemd.enable = true;
|
2023-02-25 13:45:21 +00:00
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
luks = {
|
|
|
|
|
forceLuksSupportInInitrd = true;
|
|
|
|
|
devices."cryptroot" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/9e13c8ea-96d3-45b1-85f4-d1a61233da6f";
|
|
|
|
|
};
|
2023-02-25 13:45:21 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
network = {
|
|
|
|
|
enable = true;
|
|
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 2234;
|
|
|
|
|
authorizedKeys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAqkqMYgncrnczcW/0PY+Z+FmNXXpgw6D9JWTTwiainy hensoko@hensoko-tp-work"];
|
|
|
|
|
hostKeys = [/etc/secrets/initrd/ssh_host_ed25519_key];
|
|
|
|
|
};
|
|
|
|
|
postCommands = ''
|
|
|
|
|
echo 'cryptsetup-askpass' >> /root/.profile
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
services.swraid = {
|
|
|
|
|
enable = true;
|
|
|
|
|
mdadmConf = ''
|
|
|
|
|
ARRAY /dev/md/debian:0 metadata=1.2 name=debian:0 UUID=1156202f:835af09b:2e05e02a:a1869d1c
|
|
|
|
|
'';
|
|
|
|
|
};
|
2023-02-25 13:45:21 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
fileSystems = {
|
|
|
|
|
"/" = {
|
|
|
|
|
device = "/dev/disk/by-label/root";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
2023-02-25 13:45:21 +00:00
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
"/boot" = {
|
|
|
|
|
device = "/dev/disk/by-label/boot";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
2023-02-25 13:45:21 +00:00
|
|
|
|
|
2023-11-11 00:12:57 +00:00
|
|
|
|
"/mnt/internal" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/3563f624-f8ed-4664-95d0-ca8b9db1c60a";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
2023-02-25 13:45:21 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
|
{device = "/dev/disk/by-label/swap";}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
networking.bonds."bond0" = {
|
|
|
|
|
interfaces = ["eno1" "eno2"];
|
|
|
|
|
driverOptions = {
|
|
|
|
|
miimon = "100";
|
|
|
|
|
mode = "balance-xor";
|
|
|
|
|
xmit_hash_policy = "layer3+4";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking = {
|
2023-11-11 00:12:57 +00:00
|
|
|
|
hostId = "c418ba82";
|
2023-10-01 20:03:45 +00:00
|
|
|
|
defaultGateway = {
|
|
|
|
|
address = "80.244.242.1";
|
|
|
|
|
interface = "br0";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
defaultGateway6 = {
|
|
|
|
|
address = "2001:4d88:1ffa:26::1";
|
|
|
|
|
interface = "br0";
|
|
|
|
|
};
|
2023-02-25 13:45:21 +00:00
|
|
|
|
|
|
|
|
|
nameservers = ["95.129.51.51" "80.244.244.244"];
|
|
|
|
|
|
2023-03-07 15:48:46 +00:00
|
|
|
|
bridges."br0".interfaces = ["bond0"];
|
|
|
|
|
|
|
|
|
|
interfaces."br0" = {
|
2023-02-25 13:45:21 +00:00
|
|
|
|
ipv4.addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = "80.244.242.2";
|
|
|
|
|
prefixLength = 29;
|
|
|
|
|
}
|
|
|
|
|
];
|
2023-10-01 20:03:45 +00:00
|
|
|
|
ipv6.addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = "2001:4d88:1ffa:26::2";
|
|
|
|
|
prefixLength = 64;
|
|
|
|
|
}
|
|
|
|
|
];
|
2023-02-25 13:45:21 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
}
|