feat: Add configuration and scripts for Sunshine and Gamescope integration
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"PATH": "$(PATH)"
|
||||||
|
},
|
||||||
|
"apps": [
|
||||||
|
{
|
||||||
|
"name": "SteamDeck",
|
||||||
|
"image-path": "steam.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
system_tray=disable
|
||||||
|
log_path = /home/{{ user_name }}/.local/logs/sunshine.log
|
||||||
@@ -5,19 +5,64 @@ export PATH="$HOME/.local/bin:$PATH"
|
|||||||
|
|
||||||
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
|
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
|
||||||
|
|
||||||
DESKTOP_BIN="$(command -v startplasma-wayland || true)"
|
DESKTOP_BIN="$(command -v plasmashell || true)"
|
||||||
if [ -z "$DESKTOP_BIN" ]; then
|
if [ -z "$DESKTOP_BIN" ]; then
|
||||||
log "ERROR: startplasma-wayland not found in PATH"
|
log "ERROR: plasmashell not found in PATH"
|
||||||
exit 127
|
exit 127
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "Launching Plasma: $DESKTOP_BIN"
|
export XDG_CURRENT_DESKTOP=plasma
|
||||||
exec $DESKTOP_BIN >>"$LOGFILE" 2>&1 &
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/
|
||||||
|
export XDG_CONFIG_DIRS=/usr/local/etc/xdg:/etc/xdg
|
||||||
|
export XDG_CURRENT_DESKTOP=KDE
|
||||||
|
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
||||||
|
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
export GDK_BACKEND=wayland
|
||||||
|
export CLUTTER_BACKEND=wayland
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
export KDEDIRS=/usr
|
||||||
|
export KDE_FULL_SESSION=true
|
||||||
|
export DESKTOP_SESSION=plasma
|
||||||
|
|
||||||
|
unset DISPLAY
|
||||||
|
|
||||||
|
mkdir -p $XDG_RUNTIME_DIR
|
||||||
|
chmod 700 $XDG_RUNTIME_DIR
|
||||||
|
|
||||||
|
log "Launching Plasma: $DESKTOP_BIN"
|
||||||
|
systemd-run --user --scope --quiet \
|
||||||
|
--unit=plasma.scope \
|
||||||
|
--slice=desktop.slice \
|
||||||
|
"$DESKTOP_BIN" >>"$LOGFILE" 2>&1 &
|
||||||
|
plasma_scope_pid=$!
|
||||||
|
log "Plasma started with scope pid $plasma_scope_pid"
|
||||||
|
|
||||||
|
{
|
||||||
|
SUNSHINE_BIN="$(command -v sunshine || true)"
|
||||||
|
if [ -z "$SUNSHINE_BIN" ]; then
|
||||||
|
log "ERROR: sunshine not found in PATH"
|
||||||
|
else
|
||||||
|
SUNSHINE_LOG_FILE="$HOME/.local/logs/sunshine.log"
|
||||||
|
log "Found Sunshine: $SUNSHINE_BIN, starting after 5s delay"
|
||||||
sleep 5
|
sleep 5
|
||||||
systemd-run --user --slice=sunshine.slice --scope sunshine >>"$LOGFILE" 2>&1 || {
|
systemd-run --user --scope --quiet \
|
||||||
log "ERROR: Failed to start Sunshine"
|
--unit=sunshine.scope \
|
||||||
exit 1
|
--slice=sunshine.slice \
|
||||||
|
"$SUNSHINE_BIN" "$HOME/.config/sunshine/sunshine.conf"
|
||||||
|
fi
|
||||||
} &
|
} &
|
||||||
|
|
||||||
tail -f /dev/null
|
wait "$plasma_scope_pid"
|
||||||
|
status=$?
|
||||||
|
|
||||||
|
# Stop Sunshine gracefully
|
||||||
|
if systemctl --user is-active --quiet sunshine.scope; then
|
||||||
|
log "Stopping Sunshine"
|
||||||
|
systemctl --user stop sunshine.scope
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Plasma session ended."
|
||||||
|
exit "$status"
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
LOGFILE="$HOME/.local/logs/gamescope.log"
|
LOG_FILE="$HOME/.local/logs/session.log"
|
||||||
|
|
||||||
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
|
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOG_FILE"; }
|
||||||
|
|
||||||
|
|
||||||
|
start_gamescope() {
|
||||||
|
log "Starting Gamescope session..."
|
||||||
|
|
||||||
CONF_FILE="$HOME/.config/gamescope/gamescope.conf"
|
CONF_FILE="$HOME/.config/gamescope/gamescope.conf"
|
||||||
[ -f "$CONF_FILE" ] && source "$CONF_FILE"
|
[ -f "$CONF_FILE" ] && source "$CONF_FILE"
|
||||||
@@ -13,9 +17,6 @@ RESOLUTION=${RESOLUTION:-1920x1080}
|
|||||||
WIDTH="${RESOLUTION%x*}"
|
WIDTH="${RESOLUTION%x*}"
|
||||||
HEIGHT="${RESOLUTION#*x}"
|
HEIGHT="${RESOLUTION#*x}"
|
||||||
|
|
||||||
start_gamescope() {
|
|
||||||
log "Starting Gamescope session..."
|
|
||||||
|
|
||||||
export __GL_GSYNC_ALLOWED=1
|
export __GL_GSYNC_ALLOWED=1
|
||||||
export __GL_VRR_ALLOWED=1
|
export __GL_VRR_ALLOWED=1
|
||||||
# export __GL_THREADED_OPTIMIZATIONS=1
|
# export __GL_THREADED_OPTIMIZATIONS=1
|
||||||
@@ -38,7 +39,7 @@ start_gamescope() {
|
|||||||
|
|
||||||
GAMESCOPE_ARGS="--generate-drm-mode fixed --fade-out-duration 200 --cursor-scale-height 720 -f -w $WIDTH -h $HEIGHT --rt --mangoapp -e -O \"$OUTPUT_CONNECTOR\" -r $FRAMERATE $HDR_FLAG"
|
GAMESCOPE_ARGS="--generate-drm-mode fixed --fade-out-duration 200 --cursor-scale-height 720 -f -w $WIDTH -h $HEIGHT --rt --mangoapp -e -O \"$OUTPUT_CONNECTOR\" -r $FRAMERATE $HDR_FLAG"
|
||||||
log "Launching Gamescope: $GAMESCOPE_BIN $GAMESCOPE_ARGS -- $@"
|
log "Launching Gamescope: $GAMESCOPE_BIN $GAMESCOPE_ARGS -- $@"
|
||||||
exec "$GAMESCOPE_BIN" ${GAMESCOPE_ARGS} -- "$@" >>"$LOGFILE" 2>&1
|
exec dbus-run-session -- "$GAMESCOPE_BIN" ${GAMESCOPE_ARGS} -- "$@" >>"$LOG_FILE" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
start_kwin() {
|
start_kwin() {
|
||||||
@@ -49,9 +50,18 @@ start_kwin() {
|
|||||||
exit 127
|
exit 127
|
||||||
fi
|
fi
|
||||||
|
|
||||||
KWIN_ARGS="--width $WIDTH --height $HEIGHT"
|
export XDG_CURRENT_DESKTOP=plasma
|
||||||
log "Launching KWin: $KWIN_BIN"
|
export XDG_SESSION_TYPE=wayland
|
||||||
exec "$KWIN_BIN" ${KWIN_ARGS} "$@" >>"$LOGFILE" 2>&1
|
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/
|
||||||
|
export XDG_CONFIG_DIRS=/usr/local/etc/xdg:/etc/xdg
|
||||||
|
export XDG_CURRENT_DESKTOP=KDE
|
||||||
|
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
||||||
|
|
||||||
|
# Ensure we don't run nested; width/height/fullscreen are for the windowed backend.
|
||||||
|
unset DISPLAY WAYLAND_DISPLAY
|
||||||
|
KWIN_ARGS="--drm --exit-with-session"
|
||||||
|
log "Launching KWin (DRM): $KWIN_BIN ${KWIN_ARGS} $*"
|
||||||
|
exec dbus-run-session -- "$KWIN_BIN" ${KWIN_ARGS} "$@" >>"$LOG_FILE" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -f "$HOME/.desktop-session-plasma" ]]; then
|
if [[ -f "$HOME/.desktop-session-plasma" ]]; then
|
||||||
@@ -62,3 +72,4 @@ else
|
|||||||
log "Gamescope session selected."
|
log "Gamescope session selected."
|
||||||
start_gamescope /usr/local/bin/launch_steam.sh
|
start_gamescope /usr/local/bin/launch_steam.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ set -euo pipefail
|
|||||||
LOGFILE="$HOME/.local/logs/steam.log"
|
LOGFILE="$HOME/.local/logs/steam.log"
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
|
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
||||||
|
|
||||||
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
|
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
|
||||||
|
|
||||||
# There is no way to set a color space for an NV12
|
# There is no way to set a color space for an NV12
|
||||||
@@ -62,6 +64,9 @@ export XCURSOR_SCALE=256
|
|||||||
|
|
||||||
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
|
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
|
||||||
|
|
||||||
|
mkdir -p $XDG_RUNTIME_DIR
|
||||||
|
chmod 700 $XDG_RUNTIME_DIR
|
||||||
|
|
||||||
if [ -r /proc/sys/user/max_user_namespaces ]; then
|
if [ -r /proc/sys/user/max_user_namespaces ]; then
|
||||||
max_ns="$(cat /proc/sys/user/max_user_namespaces || echo 0)"
|
max_ns="$(cat /proc/sys/user/max_user_namespaces || echo 0)"
|
||||||
if [ "${max_ns:-0}" -eq 0 ]; then
|
if [ "${max_ns:-0}" -eq 0 ]; then
|
||||||
@@ -99,14 +104,39 @@ log "Updating steam: /opt/steamcmd/steamcmd.sh +quit"
|
|||||||
log "Updating Steam ROM Manager"
|
log "Updating Steam ROM Manager"
|
||||||
srm add >> "$LOGFILE" 2>&1 || log "ERROR: Steam ROM Manager update failed"
|
srm add >> "$LOGFILE" 2>&1 || log "ERROR: Steam ROM Manager update failed"
|
||||||
|
|
||||||
|
log "Launching Steam"
|
||||||
STEAM_ARGS=("-steamdeck" "-steamos3" "-steampal" "-gamepadui" "-pipewire-dmabuf")
|
STEAM_ARGS=("-steamdeck" "-steamos3" "-steampal" "-gamepadui" "-pipewire-dmabuf")
|
||||||
log "Launching Steam: $STEAM_BIN ${STEAM_ARGS[*]}"
|
systemd-run --user --scope --quiet \
|
||||||
exec $STEAM_BIN "${STEAM_ARGS[@]}" &
|
--unit=steam.scope \
|
||||||
|
--slice=steam.slice \
|
||||||
|
"$STEAM_BIN" "${STEAM_ARGS[@]}" >>"$LOGFILE" 2>&1 &
|
||||||
|
steam_scope_pid=$!
|
||||||
|
log "Steam started with pid $steam_scope_pid"
|
||||||
|
|
||||||
|
{
|
||||||
|
SUNSHINE_BIN="$(command -v sunshine || true)"
|
||||||
|
if [ -z "$SUNSHINE_BIN" ]; then
|
||||||
|
log "ERROR: sunshine not found in PATH"
|
||||||
|
else
|
||||||
|
SUNSHINE_LOG_FILE="$HOME/.local/logs/sunshine.log"
|
||||||
|
log "Found Sunshine: $SUNSHINE_BIN, starting after 5s delay"
|
||||||
sleep 5
|
sleep 5
|
||||||
systemd-run --user --slice=sunshine.slice --scope sunshine >>"$LOGFILE" 2>&1 || {
|
systemd-run --user --scope --quiet \
|
||||||
log "ERROR: Failed to start Sunshine"
|
--unit=sunshine.scope \
|
||||||
exit 1
|
--slice=sunshine.slice \
|
||||||
|
"$SUNSHINE_BIN" "$HOME/.config/sunshine/sunshine.conf"
|
||||||
|
fi
|
||||||
} &
|
} &
|
||||||
|
|
||||||
tail -f /dev/null
|
# Wait for Steam to exit
|
||||||
|
wait "$steam_scope_pid"
|
||||||
|
status=$?
|
||||||
|
|
||||||
|
# Stop Sunshine gracefully
|
||||||
|
if systemctl --user is-active --quiet sunshine.scope; then
|
||||||
|
log "Stopping Sunshine"
|
||||||
|
systemctl --user stop sunshine.scope
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Steam session ended."
|
||||||
|
exit "$status"
|
||||||
@@ -23,5 +23,18 @@ case "$session" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if systemctl --user is-active --quiet steam.scope; then
|
||||||
|
log "Stopping steam.scope"
|
||||||
|
systemctl --user stop steam.scope
|
||||||
|
fi
|
||||||
|
if systemctl --user is-active --quiet plasma.scope; then
|
||||||
|
log "Stopping plasma.scope"
|
||||||
|
systemctl --user stop plasma.scope
|
||||||
|
fi
|
||||||
|
if systemctl --user is-active --quiet sunshine.scope; then
|
||||||
|
log "Stopping sunshine.scope"
|
||||||
|
systemctl --user stop sunshine.scope
|
||||||
|
fi
|
||||||
|
|
||||||
log "Restarting graphical session service..."
|
log "Restarting graphical session service..."
|
||||||
sudo systemctl restart gamescope-session.service
|
sudo systemctl restart gamescope-session.service
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[Slice]
|
||||||
|
CPUWeight=100
|
||||||
|
AllowedCPUs={{ general_cores }}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[Slice]
|
||||||
|
CPUWeight=100
|
||||||
|
AllowedCPUs={{ general_cores }}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[Slice]
|
||||||
|
CPUWeight=100
|
||||||
|
AllowedCPUs={{ general_cores }}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[Slice]
|
||||||
|
CPUWeight=100
|
||||||
|
AllowedCPUs={{ sunshine_cores }}
|
||||||
@@ -3,14 +3,14 @@
|
|||||||
hosts: game_station
|
hosts: game_station
|
||||||
vars:
|
vars:
|
||||||
user_name: "gameuser"
|
user_name: "gameuser"
|
||||||
gamescope_conf_dir: "/home/{{ user_name }}/.config/gamescope"
|
|
||||||
system_bin_dir: "/usr/local/bin"
|
system_bin_dir: "/usr/local/bin"
|
||||||
|
user_config_dir: "/home/{{ user_name }}/.config"
|
||||||
user_bin_dir: "/home/{{ user_name }}/.local/bin"
|
user_bin_dir: "/home/{{ user_name }}/.local/bin"
|
||||||
systemd_user_dir: "/home/{{ user_name }}/.config/systemd/user"
|
systemd_user_dir: "/home/{{ user_name }}/.config/systemd/user"
|
||||||
systemd_system_dir: "/etc/systemd/system"
|
systemd_system_dir: "/etc/systemd/system"
|
||||||
grub_cfg: "/etc/default/grub"
|
grub_cfg: "/etc/default/grub"
|
||||||
system_cores: "0,8"
|
system_cores: "0,8"
|
||||||
gamescope_cores: "2-7,10-15"
|
general_cores: "2-7,10-15"
|
||||||
sunshine_cores: "1,9"
|
sunshine_cores: "1,9"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@@ -99,27 +99,15 @@
|
|||||||
- sddm
|
- sddm
|
||||||
|
|
||||||
# System actions
|
# System actions
|
||||||
- name: Create Gamescope slice
|
- name: Install Systemd system files
|
||||||
become: true
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: "{{ systemd_system_dir }}/gamescope.slice"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0644"
|
|
||||||
content: |
|
|
||||||
[Slice]
|
|
||||||
CPUWeight=100
|
|
||||||
AllowedCPUs={{ gamescope_cores }}
|
|
||||||
|
|
||||||
- name: Install Systemd service files
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "/etc/systemd/system/{{ item | basename }}"
|
dest: "{{ systemd_system_dir }}/{{ item | basename }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
loop: "{{ query('fileglob', 'game_station/systemd/system/*.service') }}"
|
loop: "{{ query('fileglob', 'game_station/systemd/system/*') }}"
|
||||||
notify: Reload systemd daemon for system services
|
notify: Reload systemd daemon for system services
|
||||||
|
|
||||||
- name: Install System scripts
|
- name: Install System scripts
|
||||||
@@ -191,18 +179,32 @@
|
|||||||
group: "{{ user_name }}"
|
group: "{{ user_name }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
loop:
|
loop:
|
||||||
- "{{ gamescope_conf_dir }}"
|
|
||||||
- "{{ user_bin_dir }}"
|
- "{{ user_bin_dir }}"
|
||||||
- "{{ systemd_user_dir }}"
|
- "{{ systemd_user_dir }}"
|
||||||
|
- "{{ user_config_dir }}"
|
||||||
|
- "{{ user_config_dir }}/gamescope"
|
||||||
|
- "{{ user_config_dir }}/sunshine"
|
||||||
|
- "{{ user_config_dir }}/steam-rom-manager/userData"
|
||||||
- "/home/{{ user_name }}/.local/logs"
|
- "/home/{{ user_name }}/.local/logs"
|
||||||
- "/opt/steamcmd"
|
- "/home/{{ user_name }}/.local/run"
|
||||||
- "/home/{{ user_name }}/.config/steam-rom-manager/userData"
|
|
||||||
- "/home/{{ user_name }}/Emulation"
|
- "/home/{{ user_name }}/Emulation"
|
||||||
- "/home/{{ user_name }}/Emulation/snes"
|
- "/home/{{ user_name }}/Emulation/snes"
|
||||||
- "/home/{{ user_name }}/Emulation/psp"
|
- "/home/{{ user_name }}/Emulation/psp"
|
||||||
- "/home/{{ user_name }}/Emulation/genesis"
|
- "/home/{{ user_name }}/Emulation/genesis"
|
||||||
- "/home/{{ user_name }}/RetroArch/shaders"
|
- "/home/{{ user_name }}/RetroArch/shaders"
|
||||||
- "/home/{{ user_name }}/RetroArch/config"
|
- "/home/{{ user_name }}/RetroArch/config"
|
||||||
|
- "/opt/steamcmd"
|
||||||
|
|
||||||
|
- name: Install Systemd user files
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: "{{ systemd_user_dir }}/{{ item | basename }}"
|
||||||
|
owner: "{{ user_name }}"
|
||||||
|
group: "{{ user_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
loop: "{{ query('fileglob', 'game_station/systemd/user/*') }}"
|
||||||
|
notify: Reload systemd daemon for user services
|
||||||
|
|
||||||
- name: Download steamtools
|
- name: Download steamtools
|
||||||
become: true
|
become: true
|
||||||
@@ -242,30 +244,6 @@
|
|||||||
group: "{{ user_name }}"
|
group: "{{ user_name }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
- name: Write Gamescope configuration
|
|
||||||
become: true
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: "{{ gamescope_conf_dir }}/gamescope.conf"
|
|
||||||
owner: "{{ user_name }}"
|
|
||||||
mode: "0644"
|
|
||||||
content: |
|
|
||||||
OUTPUT_CONNECTOR=HDMI-A-1
|
|
||||||
FRAMERATE=120
|
|
||||||
RESOLUTION={{ lookup('env', 'GAME_RESOLUTION') | default('1920x1080') }}
|
|
||||||
HDR_ENABLED={{ lookup('env', 'HDR_ENABLED') | default('false') }}
|
|
||||||
DRM_DEVICE=/dev/dri/card1
|
|
||||||
|
|
||||||
- name: Create Sunshine slice
|
|
||||||
become: true
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: "{{ systemd_user_dir }}/sunshine.slice"
|
|
||||||
owner: "{{ user_name }}"
|
|
||||||
mode: "0644"
|
|
||||||
content: |
|
|
||||||
[Slice]
|
|
||||||
CPUWeight=100
|
|
||||||
AllowedCPUs={{ sunshine_cores }}
|
|
||||||
|
|
||||||
- name: Install User scripts
|
- name: Install User scripts
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -276,6 +254,29 @@
|
|||||||
mode: "0755"
|
mode: "0755"
|
||||||
loop: "{{ query('fileglob', 'game_station/user/*') }}"
|
loop: "{{ query('fileglob', 'game_station/user/*') }}"
|
||||||
|
|
||||||
|
- name: Write Gamescope configuration
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ user_config_dir }}/gamescope/gamescope.conf"
|
||||||
|
owner: "{{ user_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
content: |
|
||||||
|
OUTPUT_CONNECTOR=HDMI-A-1
|
||||||
|
FRAMERATE=120
|
||||||
|
RESOLUTION={{ lookup('env', 'GAME_RESOLUTION') | default('1920x1080') }}
|
||||||
|
HDR_ENABLED={{ lookup('env', 'HDR_ENABLED') | default('false') }}
|
||||||
|
DRM_DEVICE=/dev/dri/card1
|
||||||
|
|
||||||
|
- name: Install Sunshine files
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: "{{ user_config_dir }}/sunshine/{{ item | basename }}"
|
||||||
|
owner: "{{ user_name }}"
|
||||||
|
group: "{{ user_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
loop: "{{ query('fileglob', 'game_station/sunshine/*') }}"
|
||||||
|
|
||||||
- name: Enable Gamescope session service on boot
|
- name: Enable Gamescope session service on boot
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
@@ -283,7 +284,6 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: Update grub
|
- name: Update grub
|
||||||
ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg
|
ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
@@ -294,3 +294,10 @@
|
|||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
||||||
|
- name: Reload systemd daemon for user services
|
||||||
|
become: true
|
||||||
|
become_user: "{{ user_name }}"
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
daemon_reload: true
|
||||||
|
scope: user
|
||||||
|
|||||||
Reference in New Issue
Block a user