9 serialDevice = if pkgs.stdenv.hostPlatform.isx86 then "ttyS0" else "ttyAMA0";
13 maintainers = lib.teams.lxc.members;
17 ./lxc-instance-common.nix
19 ../profiles/qemu-guest.nix
23 system.build.qemuImage = import ../../lib/make-disk-image.nix {
24 inherit pkgs lib config;
26 partitionTableType = "efi";
27 format = "qcow2-compressed";
33 device = "/dev/disk/by-label/nixos";
38 device = "/dev/disk/by-label/ESP";
43 boot.growPartition = true;
44 boot.loader.systemd-boot.enable = true;
46 # image building needs to know what device to install bootloader on
47 boot.loader.grub.device = "/dev/vda";
51 "console=${serialDevice}"
55 services.udev.extraRules = ''
56 SUBSYSTEM=="cpu", CONST{arch}=="x86-64", TEST=="online", ATTR{online}=="0", ATTR{online}="1"
59 virtualisation.incus.agent.enable = lib.mkDefault true;