nix-community infrastructure [maintainer=@zowoq]
Find a file
2023-01-02 17:54:09 +10:00
.github .github/workflows/terraform.yml: add accept-flake-config 2022-12-29 18:37:11 +10:00
build01 import hetzner configuration from srvos 2023-01-01 21:12:56 +01:00
build02 build02/nixpkgs-update: defaultPackage -> packages 2023-01-02 03:50:46 +00:00
build03 import hetzner configuration from srvos 2023-01-01 21:12:56 +01:00
build04 apply treefmt to codebase 2022-12-31 07:27:07 +01:00
keys import gpg keys with import-keys-hook 2021-09-29 19:09:35 +02:00
roles README.md: community builder -> roles/builder/README.MD 2023-01-02 17:54:09 +10:00
services apply statix simplication 2023-01-01 15:30:41 +01:00
terraform re-install build04 2022-12-30 20:56:30 +01:00
users apply statix simplication 2023-01-01 15:30:41 +01:00
.envrc switch to flake 2022-04-10 21:58:25 +02:00
.gitignore .gitignore: remove nixops 2022-11-29 18:33:41 +10:00
.mergify.yml mergify: rebase merge 2022-11-16 13:59:07 +10:00
.sops.yaml re-install build04 2022-12-30 20:56:30 +01:00
bors.toml add terraform deploy action 2022-11-17 09:14:36 +10:00
ci.nix apply statix simplication 2023-01-01 15:30:41 +01:00
deploy ./deploy: also accept parameters 2022-04-11 16:19:27 +02:00
flake.lock flake.lock: Update 2023-01-02 03:50:46 +00:00
flake.nix import hetzner configuration from srvos 2023-01-01 21:12:56 +01:00
pyproject.toml apply treefmt to codebase 2022-12-31 07:27:07 +01:00
README.md README.md: community builder -> roles/builder/README.MD 2023-01-02 17:54:09 +10:00
secrets.yaml encrypt all yaml files with sops 2022-10-25 09:55:28 +02:00
shell.nix add treefmt-nix to repository 2022-12-31 07:20:52 +01:00
tasks.py apply treefmt to codebase 2022-12-31 07:27:07 +01:00
treefmt.nix also check nix files with statix 2023-01-01 21:18:13 +01:00

nix-community infrastructure

Welcome to the Nix Community infrastructure project. This project holds all the NixOS and Terraform configuration for this organization.

Community builder

We also provide one x86 hetzner build machine as a public remote builder for the nix community, see here for more information.

Hydra

If you want to build your project in our hydra, add a new project in this file.

Support

If you hit any issues, ping us on Matrix in the nix-community room (see the admin list below) or create an issue here: New Issue.

Pull requests from forks

As PRs from forks don't have automatic CI checks, admins can test PRs by posting a comment on the PR instead.

Administrators

  • @adisbladis
  • @flokli
  • @grahamc
  • @Mic92
  • @nlewo
  • @ryantm
  • @zimbatm
  • @zowoq

Services

Hosts

build01

This machine is perfect for running heavy builds.

  • Provider: Hetzner
  • CPU: AMD Ryzen 7 1700X Eight-Core Processor
  • RAM: 64GB
  • Drives: 2 x 512 GB SATA SSD

build02

This machine currently just runs r-ryantm/nixpkgs-update.

  • Provider: Hetzner
  • CPU: AMD Ryzen 7 3700X Eight-Core Processor
  • RAM: 64GB DDR4 ECC
  • Drives: 2 x 1 TB NVME in RAID 1

build03

This machine is a replacement for build01.

  • Provider: Hetzner
  • CPU: AMD Ryzen 5 3600 6-Core Processor
  • RAM: 64GB DDR4 ECC
  • Drives: 2 x 512 GB 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
  • CPU: 4 VCPUs on an Ampere Altra (arm64)
  • RAM: 24GB
  • Drives: 200 GB Block

Cache

All the builds on these machines are pushed to https://nix-community.cachix.org/

Thanks to Cachix for sponsoring our binary cache!

File hierarchy

  • ./build\d+ - build machines
  • ./deploy - Deploy script
  • ./roles - shared NixOS configuration modules
  • ./services - single instances of NixOS services
  • ./terraform - Setup DNS
  • ./users - NixOS configuration of our admins

Deployment commands:

$ ./deploy

If you want to reboot a machine, use the following command to also deploy secrets afterwards:

$ inv deploy --hosts build02 reboot --hosts build02

Install/Fix system from Hetzner recovery mode

  1. Copy your ssh key to the recovery system so that the kexec image can re-use it.
yourmachine> ssh-copy-id root@build0X.nix-community.org
  1. Download and boot into kexec-image:
$ curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-x86_64-linux.tar.gz | tar -xzf- -C /root
$ /root/kexec/run
  1. Format and/or mount all filesystems to /mnt:
$ inv format-disks --hosts buildXX --disks /dev/nvme0n1,/dev/nvme1n1
  1. Setup secrets
$ inv setup-secret --hosts buildXX
  1. Generate configuration and download to the repo
$ nixos-generate-config  --root /tmp
# optional, in most cases one can import roles/hetzner/amd.nix
$ scp buildXX.nix-community.org:/tmp/etc/nixos/hardware-configuration.nix buildXX/hardware-configuration.nix
  1. Build and install
$ inv install-nixos --hosts buildXX

Debug VM

You can start a vm from the rescue system in order to debug the boot:

$ nix-shell -p qemu_kvm --run 'qemu-kvm -m 10G -hda /dev/sda -hdb /dev/sdb -curses -cpu host -enable-kvm'