[BREAKING] Provide runtime environment systemd services from munix
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..)
This commit is contained in:
parent
604ebc1356
commit
38a96b79b3
18 changed files with 125 additions and 112 deletions
33
systemd/muvm-remote.service
Normal file
33
systemd/muvm-remote.service
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
[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
|
||||
Loading…
Add table
Add a link
Reference in a new issue