hosts/plover/profiles/hetzner-cloud-cx22: migrate certain settings to it as part of the profile

This commit is contained in:
Gabriel Arazas 2024-09-28 19:02:33 +08:00
parent 1a6ba1df90
commit 8a45ba36e7
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 19 additions and 17 deletions

View File

@ -1,7 +1,25 @@
{ modulesPath, ... }:
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
# Hetzner can only support non-UEFI bootloader (or at least it doesn't with
# systemd-boot).
boot.loader.grub = {
enable = lib.mkForce true;
efiSupport = true;
efiInstallAsRemovable = true;
};
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "nvme" ];
zramSwap.enable = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.qemuGuest.enable = true;
systemd.services.qemu-guest-agent.path = [ pkgs.shadow ];
}

View File

@ -14,22 +14,6 @@ in
lib.mkEnableOption "preferred networking setup";
config = lib.mkIf cfg.enable {
# Hetzner can only support non-UEFI bootloader (or at least it doesn't with
# systemd-boot).
boot.loader.grub = {
enable = lib.mkForce true;
device = "/dev/sda";
efiSupport = true;
efiInstallAsRemovable = true;
};
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "nvme" ];
zramSwap.enable = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking = {
enableIPv6 = true;
usePredictableInterfaceNames = lib.mkDefault true;