generated from blue-build/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
425 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
sudo podman run --rm -it \ | ||
--device=/dev/dri/renderD128 \ | ||
--device=/dev/dri/card1 \ | ||
-ipc=host \ | ||
-privileged \ | ||
-cap-add=ALL \ | ||
-security-opt seccomp=unconfined \ | ||
-e XDG_RUNTIME_DIR=/tmp \ | ||
-v ${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}:/tmp/${WAYLAND_DISPLAY}:rw \ | ||
-e XDG_SESSION_TYPE=wayland \ | ||
-e WAYLAND_DISPLAY=${WAYLAND_DISPLAY} \ | ||
-e RUN_SWAY=true \ | ||
-v /tmp/SteamGOWData:/home/retro/ \ | ||
ghcr.io/games-on-whales/steam:fix-steam-mesa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl --unix-socket /var/run/wolf/wolf.sock http://localhost/api/v1/sessions | jq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
sudo podman stop WolfPulseAudio || true | ||
sudo podman rm WolfPulseAudio || true | ||
sudo podman run --rm \ | ||
--name wolf \ | ||
--privileged \ | ||
--network=host \ | ||
--ipc=host \ | ||
--cap-add=ALL \ | ||
--device-cgroup-rule "c 13:* rmw" \ | ||
--device /dev/dri \ | ||
--device /dev/uinput \ | ||
--device /dev/uhid \ | ||
-v /tmp/sockets:/tmp/sockets:rw \ | ||
-v /etc/wolf:/etc/wolf:rw \ | ||
-v /run/podman/podman.sock:/var/run/docker.sock:ro \ | ||
-v /dev/input:/dev/input:ro \ | ||
-v /run/udev:/run/udev:rw \ | ||
--security-opt seccomp=unconfined \ | ||
ghcr.io/games-on-whales/wolf:stable | ||
|
||
|
||
# -e WOLF_RENDER_NODE=/dev/dri/renderD129 \ | ||
# -e WOLF_ENCODER_NODE=/dev/dri/renderD129 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# wolf.container | ||
# modified from: https://github.com/games-on-whales/wolf/pull/92/files | ||
[Unit] | ||
Description=Podman Wolf Gamestreaming | ||
|
||
[Service] | ||
Environment=PATH=/usr/bin | ||
TimeoutStartSec=900 | ||
|
||
# TODO: Look into using systemd-tmpfiles here: | ||
# https://wiki.archlinux.org/title/Systemd#systemd-tmpfiles_-_temporary_filesd | ||
# look into config directive/setting for /var/run abstraction | ||
ExecStartPre=-mkdir -p %T/sockets | ||
ExecStartPre=-mkdir -p /var/run/wolf | ||
ExecStartPre=-podman rm --force WolfPulseAudio | ||
Restart=on-failure | ||
RestartSec=5 | ||
StartLimitBurst=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
[Container] | ||
# Avoid needing to use systemctl daemon-reload for trivial env var changes | ||
# /etc/sysconfig is the default on Fedora based systems, /etc/default on ubuntu | ||
# TODO: is there a better way to genericize this, or maybe just dump it into /etc/wolf? | ||
EnvironmentFile=/etc/sysconfig/wolf | ||
|
||
Image=ghcr.io/games-on-whales/wolf:stable | ||
AutoUpdate=registry | ||
|
||
HostName=%N # TODO: is this the hostname we actually want? | ||
|
||
# Figure out what is actually really required here | ||
#AddCapability=CAP_SYS_PTRACE | ||
#AddCapability=CAP_NET_ADMIN | ||
AddCapability=ALL | ||
|
||
Network=host | ||
|
||
# TODO: figure out tightening back down security | ||
SecurityLabelDisable=true | ||
# same as adding '--security-opt seccomp=unconfined' to PodmanArgs | ||
SeccompProfile=unconfined | ||
|
||
PodmanArgs=--ipc=host --device-cgroup-rule "c 13:* rmw" | ||
|
||
AddDevice=/dev/dri | ||
AddDevice=/dev/uinput | ||
AddDevice=/dev/uhid | ||
|
||
Volume=/dev/input:/dev/input:ro | ||
Volume=/dev/:/dev/:ro | ||
Volume=/run/udev:/run/udev:ro | ||
Volume=%T/sockets:/tmp/sockets:rw | ||
Volume=%t/podman/podman.sock:/var/run/docker.sock:ro | ||
Volume=/etc/wolf:/etc/wolf:rw | ||
Volume=/var/run/wolf:/var/run/wolf:rw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Environment variables for Podman Wolf Gamestreaming | ||
|
||
# Temporary debugging vars | ||
#WOLF_LOG_LEVEL=DEBUG | ||
#WOLF_STOP_CONTAINER_ON_EXIT=true | ||
#WOLF_RENDER_NODE=SOFTWARE | ||
|
||
# TODO: figure out how to propagate TZ to created containers | ||
TZ=America/New_York | ||
|
||
WOLF_SOCKET_PATH=/var/run/wolf/wolf.sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Allows Wolf to access /dev/uinput | ||
KERNEL=="uinput", SUBSYSTEM=="misc", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput" | ||
|
||
# Allows Wolf to access /dev/uhid | ||
KERNEL=="uhid", TAG+="uaccess" | ||
|
||
# Move virtual keyboard and mouse into a different seat | ||
SUBSYSTEMS=="input", ATTRS{id/vendor}=="ab00", MODE="0660", GROUP="input", ENV{ID_SEAT}="seat9" | ||
|
||
# Joypads | ||
SUBSYSTEMS=="input", ATTRS{name}=="Wolf X-Box One (virtual) pad", MODE="0660", GROUP="input" | ||
SUBSYSTEMS=="input", ATTRS{name}=="Wolf PS5 (virtual) pad", MODE="0660", GROUP="input" | ||
SUBSYSTEMS=="input", ATTRS{name}=="Wolf gamepad (virtual) motion sensors", MODE="0660", GROUP="input" | ||
SUBSYSTEMS=="input", ATTRS{name}=="Wolf Nintendo (virtual) pad", MODE="0660", GROUP="input" |
Oops, something went wrong.