2023-05-16 09:53:27 +10:00
|
|
|
{ inputs, ... }:
|
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:33:51 +01:00
|
|
|
# ssh root@build01.nix-community.org "mount /dev/md[0-9]* /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:33:51 +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[0-9]* /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 = [
|
2023-05-16 09:53:27 +10:00
|
|
|
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
2023-05-17 07:21:20 +10:00
|
|
|
inputs.self.nixosModules.common
|
|
|
|
inputs.self.nixosModules.raid
|
|
|
|
inputs.self.nixosModules.zfs
|
|
|
|
inputs.self.nixosModules.builder
|
|
|
|
inputs.self.nixosModules.remote-builder-aarch64-nixos-community
|
2021-03-04 06:24:57 +01:00
|
|
|
];
|
2019-08-10 12:43:48 +01:00
|
|
|
|
2023-01-05 10:17:46 +01:00
|
|
|
# Emulate riscv64 until we have proper builders
|
|
|
|
boot.binfmt.emulatedSystems = [ "riscv64-linux" ];
|
|
|
|
|
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;
|
|
|
|
|
2022-08-13 11:13:06 +02:00
|
|
|
networking.hostName = "build01";
|
2019-08-10 12:43:48 +01:00
|
|
|
networking.hostId = "d2905767";
|
|
|
|
|
2023-01-01 17:04:38 +01:00
|
|
|
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:13b:2ceb::1/64";
|
2019-08-10 12:43:48 +01:00
|
|
|
|
2020-04-17 22:46:20 +02:00
|
|
|
system.stateVersion = "20.03";
|
2019-08-10 12:43:48 +01:00
|
|
|
}
|