{ config, lib, pkgs, ... }: let cfg = config.ptw.virtualisation; in { options.ptw.virtualisation = { enable = lib.mkEnableOption "Enable and configure virtualisation"; }; config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ virglrenderer ]; services.spice-vdagentd.enable = true; }; }