nixos server configurations
1# Hardware configuration for Hetzner Ampere VMs
2{
3 lib,
4 modulesPath,
5 ...
6}:
7{
8 imports = [
9 (modulesPath + "/profiles/qemu-guest.nix")
10 ];
11 networking.useDHCP = lib.mkDefault true;
12 nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
13 boot.initrd.availableKernelModules = [
14 "ata_piix"
15 "uhci_hcd"
16 "xen_blkfront"
17 ];
18 boot.initrd.kernelModules = [
19 "nvme"
20 #"virtio_gpu"
21 ];
22 boot.kernelParams = [ "console=tty" ];
23 boot.loader.grub = {
24 enable = true;
25 efiSupport = true;
26 efiInstallAsRemovable = true;
27 device = "nodev";
28 };
29
30 # Filesystems made by nixos-infect(?)
31 fileSystems."/boot" = {
32 device = "/dev/sda15";
33 fsType = "vfat";
34 };
35 fileSystems."/" = {
36 device = "/dev/sda1";
37 fsType = "ext4";
38 };
39
40 boot.tmp.cleanOnBoot = true;
41 zramSwap.enable = true;
42}