hydra: bare-metalify

This commit is contained in:
Astro 2022-05-05 22:34:51 +02:00
parent 859cca93df
commit 3c99985a21
11 changed files with 77 additions and 24 deletions

View File

@ -5,7 +5,7 @@
"https://nix-serve.hq.c3d2.de" "https://nix-serve.hq.c3d2.de"
]; ];
binaryCachePublicKeys = [ binaryCachePublicKeys = [
(builtins.readFile ../hosts/containers/hydra/cache-pub.key) (builtins.readFile ../hosts/hydra/cache-pub.key)
]; ];
}; };
} }

View File

@ -409,11 +409,11 @@
"openwrt-imagebuilder": "openwrt-imagebuilder" "openwrt-imagebuilder": "openwrt-imagebuilder"
}, },
"locked": { "locked": {
"lastModified": 1651275116, "lastModified": 1651782857,
"narHash": "sha256-I6gXlwQteHGcJGbAMXegJyXL7cd4Pz/b6MjoOUGz4wU=", "narHash": "sha256-EPkyxja/JOwrQnzbbmpSmMRzR5Dsp1QQwBPCvFWqn3Y=",
"ref": "master", "ref": "master",
"rev": "7a00fd74cf205e87cc8b82f18e90037e9f0311a8", "rev": "52dbdc237abae93fc93ad9ca8b3d349c36989ad0",
"revCount": 1382, "revCount": 1388,
"type": "git", "type": "git",
"url": "https://gitea.c3d2.de/zentralwerk/network.git" "url": "https://gitea.c3d2.de/zentralwerk/network.git"
}, },

View File

@ -393,8 +393,7 @@
hydra = nixosSystem' { hydra = nixosSystem' {
modules = [ modules = [
./config/lxc-container.nix ./hosts/hydra
./hosts/containers/hydra
{ {
sops.defaultSopsFile = "${secrets}/hosts/hydra/secrets.yaml"; sops.defaultSopsFile = "${secrets}/hosts/hydra/secrets.yaml";
} }

View File

@ -27,11 +27,6 @@
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPFB9fo01jzr2upEBEXiR7sSmeQoq9ll5Cf5/hjq5e4Y"; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPFB9fo01jzr2upEBEXiR7sSmeQoq9ll5Cf5/hjq5e4Y";
}; };
hydra = {
ip4 = "172.20.73.49";
ip6 = "2a00:8180:2c00:282:e03c:d7ff:fe8e:fe16";
};
kibana = { kibana = {
ip4 = "172.20.73.44"; ip4 = "172.20.73.44";
ip6 = "2a00:8180:2c00:282:460:7cff:fe28:76b2"; ip6 = "2a00:8180:2c00:282:460:7cff:fe28:76b2";

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./hardware-configuration.nix
./hydra.nix ./hydra.nix
./cache.nix ./cache.nix
./updater.nix ./updater.nix
@ -33,24 +34,35 @@
boot = { boot = {
tmpOnTmpfs = true; tmpOnTmpfs = true;
kernelModules = [ "kvm-intel" ];
kernelParams = [ "mitigations=off" "preempt=none" ];
# For cross-building # For cross-building
binfmt.emulatedSystems = [ "aarch64-linux" ]; binfmt.emulatedSystems = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "riscv32-linux" "riscv64-linux" ];
};
fileSystems."/" = {
fsType = "rootfs";
device = "rootfs";
}; };
networking = { networking = {
hostName = "hydra"; hostName = "hydra";
firewall.enable = false; firewall.enable = false;
defaultGateway = "172.20.73.1"; defaultGateway = "172.20.73.1";
interfaces.eth0.ipv4.addresses = [{ interfaces.enp3s0 = {
address = "172.20.73.49"; useDHCP = false;
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len; tempAddress = "disabled";
}]; ipv4.addresses = [{
address = "172.20.73.49";
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
}];
};
nameservers = [ "172.20.73.8" "9.9.9.9" ];
}; };
networking.interfaces.eth0 = {
useDHCP = false;
tempAddress = "disabled";
};
systemd.network.networks."40-eth0"
.networkConfig = {
IPv6AcceptRA = true;
LinkLocalAddressing = "ipv6";
};
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
# HACK: nix-2.5.1 is broken <https://github.com/NixOS/nix/issues/5728> # HACK: nix-2.5.1 is broken <https://github.com/NixOS/nix/issues/5728>

View File

@ -0,0 +1,41 @@
# 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, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6259dd9a-582b-41bc-aced-8aff8ed9ff32";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D8D1-372E";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d5e112a4-fcd3-461a-b2eb-21c6a10ad108"; }
];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -11,7 +11,7 @@ in {
buildMachines = [ { buildMachines = [ {
hostName = "localhost"; hostName = "localhost";
system = "x86_64-linux"; system = "x86_64-linux";
supportedFeatures = [ "big-parallel" "benchmark" ]; supportedFeatures = [ "big-parallel" "benchmark" "kvm" "nixos-test" ];
maxJobs = 4; maxJobs = 4;
} { } {
hostName = nix-build; hostName = nix-build;
@ -23,7 +23,13 @@ in {
system = "aarch64-linux"; system = "aarch64-linux";
supportedFeatures = [ "nixos-test" "big-parallel" "benchmark" ]; supportedFeatures = [ "nixos-test" "big-parallel" "benchmark" ];
maxJobs = 4; maxJobs = 4;
} ]; } ] ++
map (system: {
hostName = "localhost";
inherit system;
supportedFeatures = [ "nixos-test" "big-parallel" "benchmark" ];
maxJobs = 4;
}) config.boot.binfmt.emulatedSystems;
daemonCPUSchedPolicy = "idle"; daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle"; daemonIOSchedClass = "idle";