1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-18 13:31:36 +03:00
mobile-nixos/devices/qemu-x86_64/default.nix

75 lines
1.3 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
# This device description is a bit configurable through
# mobile options...
# Enabling the splash changes some settings.
splash = config.mobile.boot.stage-1.splash.enable;
kernel = pkgs.linuxPackages_5_4.kernel;
device_info = {
name = "QEMU (x86_64)";
};
modules = [
# Disk images
"ata_piix"
"sd_mod"
# Networking
"e1000"
2018-06-24 01:47:00 +03:00
# Keyboard
"hid_generic"
"pcips2" "atkbd" "i8042"
# Mouse
"mousedev"
# Input within X11
"uinput" "evdev"
# USB
"usbcore" "usbhid" "ehci_pci" "ehci_hcd"
2018-06-24 01:47:00 +03:00
# x86 RTC needed by the stage 2 init script.
"rtc_cmos"
# Video
"bochs_drm"
];
in
{
mobile.device.name = "qemu-x86_64";
mobile.device.info = device_info // {
# TODO : make kernel part of options.
inherit kernel;
kernel_cmdline = lib.concatStringsSep " " ([
"console=tty1"
"console=ttyS0"
"vt.global_cursor_default=0"
"quiet"
]);
};
mobile.hardware = {
soc = "generic-x86_64";
# For the QEMU device, this *sets* the display size.
screen = {
width = 1080;
height = 1920;
};
2019-10-05 09:44:36 +03:00
ram = 1024 * 2;
};
2018-06-27 04:52:09 +03:00
mobile.system.type = "kernel-initrd";
mobile.boot.stage-1 = {
kernel = {
modular = true;
inherit modules;
};
};
}