Merge pull request #151482 from jbpratt/kubevirt
virtualisation: implement kubevirt config
This commit is contained in:
commit
028f8c7625
1 changed files with 30 additions and 0 deletions
30
nixos/modules/virtualisation/kubevirt.nix
Normal file
30
nixos/modules/virtualisation/kubevirt.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue