2019-08-11 19:53:02 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2021-03-24 15:26:04 +01:00
|
|
|
# Boot recovery:
|
|
|
|
# Activate 64-bit Rescue system in https://robot.your-server.de/server
|
2021-03-24 18:09:03 +01:00
|
|
|
# ssh root@build03.nix-community.org "mount /dev/md* /mnt && /mnt/kexec_bundle"
|
2021-03-24 15:26:04 +01:00
|
|
|
#
|
|
|
|
# In kexec image:
|
|
|
|
# # stop autoreboot
|
|
|
|
# $ systemctl stop autoreboot.timer
|
2021-03-24 18:09:03 +01:00
|
|
|
# $ zpool import -f zroot && mount -t zfs zroot/root /mnt && mount -t zfs zroot/root/home /mnt/home && mount -t zfs zroot/root/nix /mnt/nix && mount /dev/md* /mnt/boot
|
2021-03-24 15:26:04 +01:00
|
|
|
# nixos-enter
|
2020-01-22 12:37:13 +01:00
|
|
|
{
|
2019-08-10 12:43:48 +01:00
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
2019-11-01 17:15:45 +00:00
|
|
|
|
2021-03-07 16:28:44 +00:00
|
|
|
../roles/buildkite.nix
|
|
|
|
../roles/common.nix
|
|
|
|
../roles/docker.nix
|
|
|
|
../roles/gitlab-runner.nix
|
2021-03-09 09:39:02 +01:00
|
|
|
../roles/hetzner-network.nix
|
2021-03-07 16:28:44 +00:00
|
|
|
../roles/nginx.nix
|
|
|
|
../roles/nix-community-cache.nix
|
2021-03-08 00:22:10 +00:00
|
|
|
|
2021-03-07 16:28:44 +00:00
|
|
|
../services/hydra
|
|
|
|
../services/marvin-mk2.nix
|
|
|
|
../services/matterbridge.nix
|
2021-03-04 06:24:57 +01:00
|
|
|
];
|
2019-08-10 12:43:48 +01:00
|
|
|
|
|
|
|
# /boot is a mirror raid
|
|
|
|
boot.loader.grub.devices = [ "/dev/sda" "/dev/sdb" ];
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.version = 2;
|
2021-03-24 18:15:39 +01:00
|
|
|
boot.loader.grub.extraConfig = ''
|
|
|
|
# for mdraid 1.1
|
|
|
|
insmod mdraid1x
|
|
|
|
'';
|
2019-08-10 12:43:48 +01:00
|
|
|
|
|
|
|
networking.hostName = "nix-community-build01";
|
|
|
|
networking.hostId = "d2905767";
|
|
|
|
|
2021-02-04 18:39:02 +01:00
|
|
|
# Emulate armv7 until we have proper builders
|
|
|
|
boot.binfmt.emulatedSystems = [ "armv7l-linux" ];
|
|
|
|
|
2021-03-24 18:09:23 +01:00
|
|
|
networking.nix-community.ipv6.address = "2a01:4f8:13b:2ceb::1";
|
2019-08-10 12:43:48 +01:00
|
|
|
|
2021-03-06 07:52:04 +01:00
|
|
|
systemd.services.healthcheck-ping = {
|
|
|
|
startAt = "*:0/5"; # every 5 minutes
|
|
|
|
serviceConfig.ExecStart = "${pkgs.curl}/bin/curl -X POST -sfL https://hc-ping.com/fcf6c029-5b57-44aa-b392-923f3d894dd9";
|
|
|
|
};
|
2019-08-12 17:24:59 +00:00
|
|
|
|
2019-08-10 12:43:48 +01:00
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
2020-04-17 22:46:20 +02:00
|
|
|
system.stateVersion = "20.03";
|
2019-08-10 12:43:48 +01:00
|
|
|
}
|