unify hetzner hardware profile

This commit is contained in:
Jörg Thalheim 2022-01-16 09:48:21 +01:00
parent d0de771deb
commit cf152a4640
8 changed files with 42 additions and 96 deletions

View file

@ -119,6 +119,7 @@ $ inv setup-secret --hosts buildXX
```console
$ nixos-generate-config --root /tmp
# optional, in most cases one can roles/hardware/hetzner-amd.nix
$ scp buildXX.nix-community.org:/tmp/etc/nixos/hardware-configuration.nix buildXX/hardware-configuration.nix
```

View file

@ -11,11 +11,10 @@
# nixos-enter
{
imports = [
./hardware-configuration.nix
../roles/dev-packages.nix
../roles/clone-nixpkgs.nix
../roles/common.nix
../roles/hardware/hetzner-amd.nix
../roles/hetzner-network.nix
../roles/raid.nix
../roles/builder

View file

@ -1,26 +0,0 @@
# 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" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" ];
boot.kernelModules = [ "kvm-amd" ];
fileSystems."/" = {
device = "zroot/root/nixos";
fsType = "zfs";
};
fileSystems."/home" = {
device = "zroot/root/home";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6b1b00a5-2d03-4a33-ac59-c8031e543c66";
fsType = "ext4";
};
}

View file

@ -2,11 +2,9 @@
{
imports = [
./hardware-configuration.nix
./nixpkgs-update.nix
../roles/common.nix
../roles/hardware/hetzner-amd.nix
../roles/hetzner-network.nix
../roles/hercules-ci
../roles/nginx.nix

View file

@ -1,30 +0,0 @@
# 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")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "zroot/root/nixos";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "zroot/root/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/38c6201e-5686-4984-bca1-45b606ecdde8";
fsType = "ext4";
};
}

View file

@ -10,10 +10,9 @@
# $ zpool import -f zroot && mount -t zfs zroot/root/nixos /mnt && mount -t zfs zroot/root/home /mnt/home && mount /dev/md[0-9]* /mnt/boot
# $ nixos-enter
imports = [
./hardware-configuration.nix
../roles/buildkite.nix
../roles/common.nix
../roles/hardware/hetzner-amd.nix
../roles/hercules-ci
../roles/hetzner-network.nix
../roles/nginx.nix

View file

@ -1,33 +0,0 @@
# 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")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "zroot/root/nixos";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "zroot/root/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0d4f251e-2d79-4769-85a3-4c56e757d545";
fsType = "ext4";
};
swapDevices = [ ];
}

View file

@ -0,0 +1,38 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
"${modulesPath}/installer/scan/not-detected.nix"
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
# SATA ssd (only build01)
"sd_mod"
# NVME
"nvme"
];
boot.kernelModules = [
"kvm-amd"
];
fileSystems."/" = {
device = "zroot/root/nixos";
fsType = "zfs";
};
fileSystems."/home" = {
device = "zroot/root/home";
fsType = "zfs";
# We don't want servers to go in systemd rescue mode, but rather having
# failed mounts show up in monitoring
options = [ "nofail" ];
};
fileSystems."/boot" = {
device = "/dev/md127";
fsType = "ext4";
options = [ "nofail" ];
};
}