Simon Bruder
16cf73afb9
Previously, it was hosted on Ionos’s VMware-based infrastructure. I already had a VPS on their new KVM-based infrastructure, as I was planning to migrate okarin to it eventually (as it is cheaper). However, the new infrastructure does not offer PTR records for IPv6 addresses. Therefore, I was waiting until they would implement that feature (as the support promised me they would to in the near future). However, they are now migrating the (at least my) guests from their VMware hypervisors onto the KVM ones, assigning new IPv6 addresses to them. This makes the old VPS essentially the same as the old one, but with less memory and more expensive. So I decided to migrate now.
67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
# SPDX-FileCopyrightText: 2023-2024 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
{ lib, modulesPath, ... }:
|
|
|
|
{
|
|
imports = [
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
|
];
|
|
|
|
sbruder.machine.isVm = true;
|
|
|
|
boot = {
|
|
kernelModules = [ ];
|
|
extraModulePackages = [ ];
|
|
kernelParams = [ "ip=dhcp" ];
|
|
initrd = {
|
|
availableKernelModules = [ "aesni_intel" "ahci" "sd_mod" "sr_mod" "virtio_net" "virtio_pci" "xhci_pci" ];
|
|
kernelModules = [ ];
|
|
network = {
|
|
enable = true; # remote unlocking
|
|
# for some reason, the DHCP server does not transmit the static route to the gateway in a form udhcpc understands
|
|
# this works around this, but is arguably quite hacky
|
|
postCommands = ''
|
|
ip route add 85.215.165.1 dev eth0
|
|
ip route add default via 85.215.165.1 dev eth0
|
|
'';
|
|
};
|
|
luks.devices."root".device = "/dev/disk/by-uuid/1dcb9ee1-5594-4174-98a7-a362da09f131";
|
|
};
|
|
loader.grub.device = "/dev/vda";
|
|
};
|
|
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "/dev/disk/by-uuid/3ab8f4a7-952c-4b6c-93c6-7b307d5bb88b";
|
|
fsType = "btrfs";
|
|
options = [ "compress=zstd" "discard" "noatime" "ssd" ]; # for some reason, the kernel assumes rotational
|
|
};
|
|
"/boot" = {
|
|
device = "/dev/disk/by-uuid/97aec56b-5fea-4445-83dc-4a20dcf482ce";
|
|
fsType = "ext2";
|
|
};
|
|
};
|
|
|
|
zramSwap = {
|
|
enable = true;
|
|
memoryPercent = 150;
|
|
};
|
|
|
|
networking = {
|
|
useDHCP = false;
|
|
usePredictableInterfaceNames = false;
|
|
};
|
|
systemd.network = {
|
|
enable = true;
|
|
networks = {
|
|
eth0 = {
|
|
name = "eth0";
|
|
DHCP = "yes";
|
|
domains = [ "sbruder.de" ];
|
|
};
|
|
};
|
|
};
|
|
}
|