diff options
author | Lassulus <github@lassul.us> | 2021-12-25 22:05:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-25 22:05:00 +0100 |
commit | 028f8c76251fd6a316b50bb05682dc1ceec84cc7 (patch) | |
tree | 89a8ccd390631222f3a3a5da44563182b1965ba5 /nixos | |
parent | feabe463e6b7e9f142082332b468f3b379c7f0f6 (diff) | |
parent | e96e5ddd1fd3fa7836ffc7fab5708ed78f1fda5d (diff) |
Merge pull request #151482 from jbpratt/kubevirt
virtualisation: implement kubevirt config
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/virtualisation/kubevirt.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/kubevirt.nix b/nixos/modules/virtualisation/kubevirt.nix new file mode 100644 index 0000000000000..408822b6af0bd --- /dev/null +++ b/nixos/modules/virtualisation/kubevirt.nix @@ -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"; + }; + }; +} |