mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-14 12:53:43 +01:00
komorebi-for-kde/nix/ -> nix/linux/ komorebi-for-mac/nix/ -> nix/macos/ The nix expressions of the platforms (modules, option files, VM test suites, kwin effects, the darwin module) sit next to the existing nix/workspace-src.nix. Renames only (252 files); the flakes that import them are replaced by one root flake later in this stack, so nix does not evaluate at this revision.
58 lines
1.7 KiB
Nix
58 lines
1.7 KiB
Nix
{ lib, pkgs, ... }:
|
|
|
|
# The Plasma session guest as a plain disk image, for a hypervisor with a GPU: UTM on Apple Silicon
|
|
# runs QEMU with virtio-gpu-gl (virgl over ANGLE/CoreGL), which the QEMU in nixpkgs, and so the
|
|
# 9p-booted `plasma-vm-session`, cannot: that one composites with llvmpipe on the CPU.
|
|
#
|
|
# This is the same session as plasma-vm.nix (komorebi from the module, KRDP), booted from its own
|
|
# disk by UEFI instead of from a kernel and the host's /nix/store. docs/dev/utm.md says how to
|
|
# install it onto a disk image and point UTM at it.
|
|
{
|
|
imports = [ ./plasma-vm.nix ];
|
|
|
|
komorebi.plasmaVm.session = true;
|
|
|
|
networking.hostName = lib.mkOverride 40 "plasma-utm";
|
|
|
|
boot.loader = {
|
|
grub = {
|
|
enable = true;
|
|
efiSupport = true;
|
|
efiInstallAsRemovable = true;
|
|
device = "nodev";
|
|
};
|
|
efi.canTouchEfiVariables = false;
|
|
timeout = 1;
|
|
};
|
|
|
|
boot.initrd.availableKernelModules = [
|
|
"virtio_pci"
|
|
"virtio_blk"
|
|
"virtio_net"
|
|
"virtio_scsi"
|
|
"xhci_pci"
|
|
"usbhid"
|
|
];
|
|
# kms from the start, so that sddm has a screen to start on
|
|
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
|
boot.kernelParams = [ "console=tty0" ];
|
|
boot.growPartition = true;
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-label/nixos";
|
|
fsType = "ext4";
|
|
autoResize = true;
|
|
};
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-label/ESP";
|
|
fsType = "vfat";
|
|
};
|
|
|
|
# the window follows the guest's resolution, and the clipboard is shared
|
|
services.spice-vdagentd.enable = true;
|
|
services.qemuGuest.enable = true;
|
|
|
|
# to check that the session really is on the GPU: `eglinfo | grep -i renderer` says virgl
|
|
environment.systemPackages = [ pkgs.mesa-demos ];
|
|
}
|