forked from c3d2/nix-config
hydra: bare-metalify
This commit is contained in:
parent
859cca93df
commit
3c99985a21
|
@ -5,7 +5,7 @@
|
|||
"https://nix-serve.hq.c3d2.de"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
(builtins.readFile ../hosts/containers/hydra/cache-pub.key)
|
||||
(builtins.readFile ../hosts/hydra/cache-pub.key)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -409,11 +409,11 @@
|
|||
"openwrt-imagebuilder": "openwrt-imagebuilder"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1651275116,
|
||||
"narHash": "sha256-I6gXlwQteHGcJGbAMXegJyXL7cd4Pz/b6MjoOUGz4wU=",
|
||||
"lastModified": 1651782857,
|
||||
"narHash": "sha256-EPkyxja/JOwrQnzbbmpSmMRzR5Dsp1QQwBPCvFWqn3Y=",
|
||||
"ref": "master",
|
||||
"rev": "7a00fd74cf205e87cc8b82f18e90037e9f0311a8",
|
||||
"revCount": 1382,
|
||||
"rev": "52dbdc237abae93fc93ad9ca8b3d349c36989ad0",
|
||||
"revCount": 1388,
|
||||
"type": "git",
|
||||
"url": "https://gitea.c3d2.de/zentralwerk/network.git"
|
||||
},
|
||||
|
|
|
@ -393,8 +393,7 @@
|
|||
|
||||
hydra = nixosSystem' {
|
||||
modules = [
|
||||
./config/lxc-container.nix
|
||||
./hosts/containers/hydra
|
||||
./hosts/hydra
|
||||
{
|
||||
sops.defaultSopsFile = "${secrets}/hosts/hydra/secrets.yaml";
|
||||
}
|
||||
|
|
|
@ -27,11 +27,6 @@
|
|||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPFB9fo01jzr2upEBEXiR7sSmeQoq9ll5Cf5/hjq5e4Y";
|
||||
};
|
||||
|
||||
hydra = {
|
||||
ip4 = "172.20.73.49";
|
||||
ip6 = "2a00:8180:2c00:282:e03c:d7ff:fe8e:fe16";
|
||||
};
|
||||
|
||||
kibana = {
|
||||
ip4 = "172.20.73.44";
|
||||
ip6 = "2a00:8180:2c00:282:460:7cff:fe28:76b2";
|
||||
|
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./hydra.nix
|
||||
./cache.nix
|
||||
./updater.nix
|
||||
|
@ -33,24 +34,35 @@
|
|||
|
||||
boot = {
|
||||
tmpOnTmpfs = true;
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
kernelParams = [ "mitigations=off" "preempt=none" ];
|
||||
# For cross-building
|
||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
fsType = "rootfs";
|
||||
device = "rootfs";
|
||||
binfmt.emulatedSystems = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "riscv32-linux" "riscv64-linux" ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "hydra";
|
||||
firewall.enable = false;
|
||||
defaultGateway = "172.20.73.1";
|
||||
interfaces.eth0.ipv4.addresses = [{
|
||||
address = "172.20.73.49";
|
||||
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
|
||||
}];
|
||||
interfaces.enp3s0 = {
|
||||
useDHCP = false;
|
||||
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: {
|
||||
# HACK: nix-2.5.1 is broken <https://github.com/NixOS/nix/issues/5728>
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ in {
|
|||
buildMachines = [ {
|
||||
hostName = "localhost";
|
||||
system = "x86_64-linux";
|
||||
supportedFeatures = [ "big-parallel" "benchmark" ];
|
||||
supportedFeatures = [ "big-parallel" "benchmark" "kvm" "nixos-test" ];
|
||||
maxJobs = 4;
|
||||
} {
|
||||
hostName = nix-build;
|
||||
|
@ -23,7 +23,13 @@ in {
|
|||
system = "aarch64-linux";
|
||||
supportedFeatures = [ "nixos-test" "big-parallel" "benchmark" ];
|
||||
maxJobs = 4;
|
||||
} ];
|
||||
} ] ++
|
||||
map (system: {
|
||||
hostName = "localhost";
|
||||
inherit system;
|
||||
supportedFeatures = [ "nixos-test" "big-parallel" "benchmark" ];
|
||||
maxJobs = 4;
|
||||
}) config.boot.binfmt.emulatedSystems;
|
||||
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
daemonIOSchedClass = "idle";
|
Loading…
Reference in New Issue