These services evolve as munix evolves, so they should not be part of the system closures themselves. Mount them into /run/systemd instead. (Yes, making /run/systemd/system a symlink to RO files is unfortunate, that could be changed in the future. FS prep code is annoying too..)
33 lines
1.3 KiB
Desktop File
33 lines
1.3 KiB
Desktop File
[Unit]
|
|
After=sockets.target
|
|
Description=microVM Application runner
|
|
OnFailure=exit.target
|
|
OnSuccess=exit.target
|
|
Wants=sockets.target
|
|
|
|
[Service]
|
|
Type=exec
|
|
# Environment="LOCALE_ARCHIVE=/nix/store/1hilqf0v1nm2w8xj87pwpm0rgq6lvhlv-glibc-locales-2.42-47/lib/locale/locale-archive"
|
|
# Environment="TZDIR=/nix/store/80izpiglrlqv2zb7rd7m5274k2dr142l-tzdata-2025c/share/zoneinfo"
|
|
Environment=WAYLAND_DISPLAY=wayland-1
|
|
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/vm-user/dbus.sock
|
|
Environment=PATH=/run/current-system/sw/bin
|
|
PassEnvironment=MESA_LOADER_DRIVER_OVERRIDE
|
|
PassEnvironment=MUVM_REMOTE_CONFIG
|
|
PassEnvironment=TERM
|
|
PassEnvironment=XDG_SESSION_TYPE
|
|
PassEnvironment=SDL_VIDEODRIVER
|
|
PassEnvironment=QT_QPA_PLATFORM
|
|
PassEnvironment=_JAVA_AWT_WM_NONREPARENTING
|
|
PassEnvironment=ELECTRON_OZONE_PLATFORM_HINT
|
|
PassEnvironment=GTK_USE_PORTAL
|
|
PassEnvironment=QT_QPA_PLATFORMTHEME
|
|
ExecStartPre=+/run/current-system/sw/bin/chown appvm:appvm /run/vm-user
|
|
ExecStart=/opt/bin/muvm-remote
|
|
ExecStopPost=+/nix/store/ygzfhw5nxrn7qqfqmz2s9p6cikcjqqkh-python3-3.13.11/bin/python -c "import os,fcntl,struct;print(os.getenv('EXIT_STATUS', '1'));fcntl.ioctl(os.open('/', os.O_RDONLY), 0x7602, int(os.getenv('EXIT_STATUS', '1')))"
|
|
User=appvm
|
|
Group=appvm
|
|
StandardError=tty
|
|
StandardInput=tty
|
|
StandardOutput=tty
|
|
TTYPath=/dev/hvc0
|