nixos-riscv/vm.nix
Rodrigo Arias Mallo 483ad2944b Format the qcow2 image with ext4
The image needs to be available to the guest with a partition table and
a partition with a label named "nixos" so the stage1 can mount it. By
enabling the virtualisation.diskImage option we now have a persistent
root filesystem, including /home.
2024-01-25 15:34:59 +01:00

33 lines
668 B
Nix

{ config, lib, pkgs, modulesPath, ... }:
# Contains the configuration to make a VM bootable with qemu.
{
imports = [
"${modulesPath}/virtualisation/qemu-vm.nix"
];
boot = {
kernelParams = [ "boot.shell_on_fail" ];
consoleLogLevel = lib.mkDefault 7;
initrd.kernelModules = [
"virtio_pci"
"virtio_blk"
"virtio_input"
"9pnet"
"9pnet_virtio"
];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
#virtualisation.diskImage = null;
# FIXME: Broken as rustc injects compressed instructions.
# For now we disable it.
services.nscd.enableNsncd = false;
}