Add sidebus integration
This commit is contained in:
parent
030503f23b
commit
9f0f835fce
6 changed files with 152 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ self, virtwl }:
|
||||
{ self, virtwl, sidebus }:
|
||||
{ pkgs, lib, utils, config, ... }: let
|
||||
useTTY = {
|
||||
TTYPath = "/dev/hvc0";
|
||||
|
|
@ -130,7 +130,12 @@ in {
|
|||
serviceConfig = {
|
||||
Type = "exec";
|
||||
PassEnvironment = ["TERM" "MUVM_REMOTE_CONFIG"]; # "KRUN_CONFIG"];
|
||||
Environment = ["XDG_RUNTIME_DIR=${runtimeDir}" "WAYLAND_DISPLAY=wayland-1" "PATH=/run/current-system/sw/bin"];
|
||||
Environment = [
|
||||
"XDG_RUNTIME_DIR=${runtimeDir}"
|
||||
"WAYLAND_DISPLAY=wayland-1"
|
||||
"DBUS_SESSION_BUS_ADDRESS=unix:path=${runtimeDir}/sidebus.sock"
|
||||
"PATH=/run/current-system/sw/bin"
|
||||
];
|
||||
User = "appvm";
|
||||
Group = "appvm";
|
||||
ExecStart = "/opt/bin/muvm-remote";
|
||||
|
|
@ -179,6 +184,7 @@ in {
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.sockets.wayland-proxy-virtwl = {
|
||||
enable = true;
|
||||
description = "Wayland cross-domain proxy socket";
|
||||
|
|
@ -204,6 +210,30 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
systemd.sockets.sidebus-agent = {
|
||||
enable = true;
|
||||
description = "D-Bus cross-domain proxy socket";
|
||||
wantedBy = ["microvm.target"];
|
||||
partOf = ["sidebus-agent.service"];
|
||||
listenStreams = [ "${runtimeDir}/sidebus.sock" ];
|
||||
socketConfig = {
|
||||
SocketUser = "appvm";
|
||||
SocketGroup = "appvm";
|
||||
};
|
||||
};
|
||||
systemd.services.sidebus-agent = {
|
||||
enable = true;
|
||||
description = "D-Bus cross-domain proxy";
|
||||
requires = ["sidebus-agent.socket"];
|
||||
serviceConfig = {
|
||||
ImportCredential = "sidebus.port";
|
||||
ExecStartPre = "/run/current-system/sw/bin/env";
|
||||
ExecStart = "${sidebus.packages.${pkgs.system}.sidebus-agent}/bin/sidebus-agent";
|
||||
User = "appvm";
|
||||
Group = "appvm";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.package = self.packages.${pkgs.system}.mesa;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue