commit
a35272b352
8 changed files with 114 additions and 1 deletions
10
README.md
10
README.md
|
@ -59,6 +59,16 @@ This machine is a replacement for build01.
|
||||||
* RAM: 64GB DDR4 ECC
|
* RAM: 64GB DDR4 ECC
|
||||||
* Drives: 2 x 512 TB NVME in RAID 1
|
* Drives: 2 x 512 TB NVME in RAID 1
|
||||||
|
|
||||||
|
### `build04`
|
||||||
|
|
||||||
|
This machine is meant as an aarch64 builder for our hydra instance running on build03.
|
||||||
|
|
||||||
|
* Provider: Oracle cloud
|
||||||
|
* Instance type: [Ampere A1 Compute](https://www.oracle.com/cloud/compute/arm/)
|
||||||
|
* CPU: 4 VCPUs on an Ampere Altra (arm64)
|
||||||
|
* RAM: 24GB
|
||||||
|
* Drives: 200 GB Block
|
||||||
|
|
||||||
## Cache
|
## Cache
|
||||||
|
|
||||||
All the builds on these machines are pushed to https://nix-community.cachix.org/
|
All the builds on these machines are pushed to https://nix-community.cachix.org/
|
||||||
|
|
45
build04/configuration.nix
Normal file
45
build04/configuration.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../roles/common.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.system = "aarch64-linux";
|
||||||
|
|
||||||
|
# we use grub because systemd-boot sometimes fail on aarch64/EFI
|
||||||
|
boot.loader.grub.devices = [ "nodev" ];
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.efiSupport = true;
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.grub.extraConfig = ''
|
||||||
|
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
|
||||||
|
terminal_input --append serial
|
||||||
|
terminal_output --append serial
|
||||||
|
'';
|
||||||
|
|
||||||
|
networking.hostName = "nix-community-build04";
|
||||||
|
networking.hostId = "8daf74c0";
|
||||||
|
|
||||||
|
networking.usePredictableInterfaceNames = false;
|
||||||
|
# networkd chokes on some ipv6 messages that the oracle network sends
|
||||||
|
networking.dhcpcd.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "21.11";
|
||||||
|
}
|
||||||
|
|
||||||
|
# after loading kexec, be patient. The kexec image can take up to 5 minutes to boot
|
||||||
|
# partition guide
|
||||||
|
/*
|
||||||
|
sgdisk -n 1:0:+800M -N 2 -t 1:ef00 -t 2:8304 /dev/sda
|
||||||
|
mkfs.vfat -b32 /dev/sda1
|
||||||
|
zpool create zroot -O acltype=posixacl -O xattr=sa -O compression=lz4 /dev/sda2
|
||||||
|
zfs create -o mountpoint=none zroot/root
|
||||||
|
zfs create -o mountpoint=legacy zroot/root/nixos
|
||||||
|
zfs create -o mountpoint=legacy zroot/root/home
|
||||||
|
mount -t zfs zroot/root/nixos /mnt
|
||||||
|
mkdir /mnt/{home,boot}
|
||||||
|
mount -t zfs zroot/root/home /mnt/home
|
||||||
|
mount /dev/sda1 /mnt/boot
|
||||||
|
*/
|
32
build04/hardware-configuration.nix
Normal file
32
build04/hardware-configuration.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# 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 + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "zroot/root/nixos";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "zroot/root/home";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/E6D6-572B";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
}
|
|
@ -163,4 +163,13 @@ in
|
||||||
permissions = "0600";
|
permissions = "0600";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
build04 =
|
||||||
|
{ resources, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./build04/configuration.nix
|
||||||
|
];
|
||||||
|
deployment.targetHost = "158.101.223.107";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
niv;
|
niv;
|
||||||
nixopsUnstable = (pkgs.nixopsUnstable.withPlugins(ps: []));
|
nixopsUnstable = (pkgs.nixopsUnstable.withPlugins(ps: []));
|
||||||
|
|
||||||
terraform = pkgs.terraform.withPlugins (
|
terraform = pkgs.terraform_0_12.withPlugins (
|
||||||
p: [
|
p: [
|
||||||
p.cloudflare
|
p.cloudflare
|
||||||
p.null
|
p.null
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
./users.nix
|
./users.nix
|
||||||
./sshd.nix
|
./sshd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# ttyAMA0 is consoles on aarch64
|
||||||
|
boot.kernelParams = [ "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
# Hetzner bootstrap from rescue system
|
# Hetzner bootstrap from rescue system
|
||||||
|
|
BIN
secrets/build04-root.txt
Normal file
BIN
secrets/build04-root.txt
Normal file
Binary file not shown.
|
@ -44,6 +44,20 @@ resource "cloudflare_record" "nix-community-org-build03-AAAA" {
|
||||||
type = "AAAA"
|
type = "AAAA"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "nix-community-org-build04-A" {
|
||||||
|
zone_id = local.nix_community_org_zone_id
|
||||||
|
name = "build04"
|
||||||
|
value = "158.101.223.107"
|
||||||
|
type = "A"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "nix-community-org-build04-AAAA" {
|
||||||
|
zone_id = local.nix_community_org_zone_id
|
||||||
|
name = "build04"
|
||||||
|
value = "2603:c022:c001:b500:1::"
|
||||||
|
type = "AAAA"
|
||||||
|
}
|
||||||
|
|
||||||
# Used by nix-community/nixpkgs-docker
|
# Used by nix-community/nixpkgs-docker
|
||||||
resource "cloudflare_record" "nix-community-org-docker-CNAME" {
|
resource "cloudflare_record" "nix-community-org-docker-CNAME" {
|
||||||
zone_id = local.nix_community_org_zone_id
|
zone_id = local.nix_community_org_zone_id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue