Merge pull request #151482 from jbpratt/kubevirt

virtualisation: implement kubevirt config
This commit is contained in:
Lassulus 2021-12-25 22:05:00 +01:00 committed by GitHub
commit 028f8c7625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:
{
imports = [
../profiles/qemu-guest.nix
];
config = {
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
boot.growPartition = true;
boot.kernelParams = [ "console=ttyS0" ];
boot.loader.grub.device = "/dev/vda";
boot.loader.timeout = 0;
services.qemuGuest.enable = true;
services.openssh.enable = true;
services.cloud-init.enable = true;
systemd.services."serial-getty@ttyS0".enable = true;
system.build.kubevirtImage = import ../../lib/make-disk-image.nix {
inherit lib config pkgs;
format = "qcow2";
};
};
}