nixos/profiles/hetzner-cloud-cx22: init

It's mostly generic at this point and I want to manage more of them.
This commit is contained in:
Gabriel Arazas 2024-10-02 13:07:10 +08:00
parent 6e3dd18633
commit 9dfb0980ad
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 26 additions and 5 deletions

View File

@ -2,16 +2,12 @@
{
imports = [
# Since this will be rarely configured, make sure to import the appropriate
# hardware modules depending on the hosting provider (and even just the
# server).
./modules/profiles/hetzner-cloud-cx22.nix
# The users for this host.
(foodogsquaredUtils.getUser "nixos" "admin")
(foodogsquaredUtils.getUser "nixos" "plover")
"${foodogsquaredModulesPath}/profiles/hardened.nix"
"${foodogsquaredModulesPath}/profiles/hetzner-cloud-cx22.nix"
./disko.nix

View File

@ -0,0 +1,25 @@
{ 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 ];
}