mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-22 16:58:31 +02:00
fix: run other k3s clusters as kubevirt quests, use the interface provided by kubevirt
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.cloud-init.enable = true;
|
||||
# we configure the host via nixos itself, so we don't need the cloud-init
|
||||
services.cloud-init.enable = false;
|
||||
systemd.services."serial-getty@ttyS0".enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{lib, ...}:
|
||||
##############################################################################
|
||||
#
|
||||
# Template for Proxmox's VM, mainly based on:
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/virtualisation/proxmox-image.nix
|
||||
#
|
||||
# the url above is used by `nixos-generator` to generate the Proxmox's VMA image file.
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
boot = {
|
||||
# after resize the disk, it will grow partition automatically.
|
||||
growPartition = true;
|
||||
kernelParams = ["console=ttyS0"];
|
||||
loader.grub = {
|
||||
device = "/dev/vda";
|
||||
|
||||
# we do not support EFI, so disable it.
|
||||
efiSupport = false;
|
||||
efiInstallAsRemovable = false;
|
||||
};
|
||||
|
||||
loader.timeout = lib.mkForce 3; # wait for 3 seconds to select the boot entry
|
||||
initrd.availableKernelModules = ["uas" "virtio_blk" "virtio_pci"];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
autoResize = true;
|
||||
fsType = "ext4";
|
||||
};
|
||||
# we do not have a /boot partition, so do not mount it.
|
||||
|
||||
# it alse had qemu-guest-agent installed by default.
|
||||
services.qemuGuest.enable = lib.mkDefault true;
|
||||
}
|
||||
Reference in New Issue
Block a user