hosts/plover: update hardware config according to Hetzner Cloud defaults

This commit is contained in:
Gabriel Arazas 2023-01-06 20:26:32 +08:00
parent 533995eb09
commit e90a719ca8

View File

@ -1,16 +1,19 @@
{ lib, pkgs, modulesPath, ... }:
{ config, lib, pkgs, modulesPath, ... }:
# Most of the filesystems listed here are supposed to be overriden to default
# settings of whatever image format configuration this host system will import
# from nixos-generators.
#
# Take note that this hardware configuration is mostly considered with Hetzner
# Cloud hardware server settings in mind. Be sure to replace it whenever you
# update your cloud provider.
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = lib.mkOverride 2000 {
@ -24,10 +27,14 @@
fsType = "vfat";
};
zramSwap.enable = true;
swapDevices = [{
label = "swap";
options = [ "defaults" ];
priority = 5;
}];
zramSwap = {
enable = true;
numDevices = 1;
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true;
}