mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-25 02:41:26 +01:00
* feat: new host - idols-akane * fix: missing efi files * fix: efi partition - permission issue
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{
|
|
modulesPath,
|
|
lib,
|
|
...
|
|
}:
|
|
##############################################################################
|
|
#
|
|
# Template for KubeVirt's VM, mainly based on:
|
|
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/kubevirt.nix
|
|
#
|
|
# We write our hardware-configuration.nix, so that we can do some customization more easily.
|
|
#
|
|
# the url above is used by `nixos-generator` to generate the KubeVirt's qcow2 image file.
|
|
#
|
|
##############################################################################
|
|
{
|
|
imports = [
|
|
"${toString modulesPath}/profiles/qemu-guest.nix"
|
|
];
|
|
|
|
config = {
|
|
# disable backups in the VM
|
|
services.btrbk.instances = lib.mkForce { };
|
|
|
|
boot.growPartition = true;
|
|
boot.kernelParams = [ "console=ttyS0" ];
|
|
boot.loader.grub.device = "/dev/vda";
|
|
|
|
services.qemuGuest.enable = true; # qemu-guest-agent
|
|
services.openssh.enable = true;
|
|
# we configure the host via nixos itself, so we don't need the cloud-init
|
|
services.cloud-init.enable = lib.mkForce false;
|
|
systemd.services."serial-getty@ttyS0".enable = true;
|
|
};
|
|
}
|