diff --git a/flake.nix b/flake.nix index 1283e61..c4a8f5a 100644 --- a/flake.nix +++ b/flake.nix @@ -114,6 +114,7 @@ wob-vpn-gw.imports = commonModules ++ [ ./hosts/wob-vpn-gw ]; buildbot.imports = commonModules ++ [ ./hosts/buildbot ]; public01.imports = commonModules ++ [ ./hosts/public01 ]; + build-coord.imports = commonModules ++ [ ./hosts/build-coord ]; } // builders; hydraJobs = builtins.mapAttrs (n: v: v.config.system.build.netbootDir or v.config.system.build.toplevel) self.nixosConfigurations; diff --git a/hosts/build-coord/default.nix b/hosts/build-coord/default.nix new file mode 100644 index 0000000..b7ca17a --- /dev/null +++ b/hosts/build-coord/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ ./hardware.nix ]; + + networking.hostName = "build-coord"; + networking.domain = "wob01.infra.forkos.org"; + + bagel.sysadmin.enable = true; + + system.stateVersion = "24.05"; + deployment.targetHost = "build-coord.wob01.infra.forkos.org"; +} diff --git a/hosts/build-coord/hardware.nix b/hosts/build-coord/hardware.nix new file mode 100644 index 0000000..e4b4e31 --- /dev/null +++ b/hosts/build-coord/hardware.nix @@ -0,0 +1,74 @@ +{ + 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"; }; +}