Skip to content

Commit

Permalink
core/steam: logically structure dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Jan 25, 2025
1 parent 9ce4337 commit 6d898aa
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,22 @@ RUN \
RUN systemctl set-default graphical.target && \
systemctl enable sddm && \
printf "[General]\nDisplayServer=wayland\nGreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell\n\n[Wayland]\nCompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1" | sudo tee /etc/sddm.conf.d/10-wayland.conf && \
sed -i -z 's/#HandlePowerKey=poweroff\n#HandlePowerKeyLongPress=ignore/HandlePowerKey=suspend\nHandlePowerKeyLongPress=poweroff/' /etc/systemd/logind.conf && \
systemctl mask zswap-arm.service NetworkManager.service firewalld.service \
[email protected] [email protected] \
systemd-firstboot.service systemd-remount-fs.service \
steamos-install-steamcl steamos-install-grub etc.mount

# add skiff core user
RUN useradd -m core && \
printf "# skiff core user\ncore ALL=(ALL) NOPASSWD: ALL\n" > \
/etc/sudoers.d/10-skiff-core && \
printf "# skiff core user\ncore ALL=(ALL) NOPASSWD: ALL\n" > /etc/sudoers.d/10-skiff-core && \
chmod 0400 /etc/sudoers.d/10-skiff-core && \
visudo -c -f /etc/sudoers.d/10-skiff-core && \
groupadd nopasswdlogin && \
usermod -aG nopasswdlogin core && \
printf "[Autologin]\nUser=core\nSession=plasma.desktop\nRelogin=false\n\n[General]\nNumlockOnWaylandEnable=true" | sudo tee /etc/sddm.conf.d/10-autologin.conf && \
sed -i '0,/^[^#]/s//auth sufficient pam_succeed_if.so user ingroup nopasswdlogin\n&/' /etc/pam.d/sddm-autologin && \
printf "[Unit]\nDescription=Fix Steam directory permissions\nAfter=graphical.target\n\n[Service]\nType=oneshot\nExecStart=/bin/chown core:core /home/core/.local/ /home/core/.local/share /home/core/.local/share/Steam\n\n[Install]\nWantedBy=graphical.target" | sudo tee /etc/systemd/system/fix-steam-perms.service && sudo systemctl enable fix-steam-perms.service && \
sed -i -z 's/#HandlePowerKey=poweroff\n#HandlePowerKeyLongPress=ignore/HandlePowerKey=suspend\nHandlePowerKeyLongPress=poweroff/' /etc/systemd/logind.conf
printf "[Unit]\nDescription=Fix Steam directory permissions\nAfter=graphical.target\n\n[Service]\nType=oneshot\nExecStart=/bin/chown core:core /home/core/.local/ /home/core/.local/share /home/core/.local/share/Steam\n\n[Install]\nWantedBy=graphical.target" | sudo tee /etc/systemd/system/fix-steam-perms.service && sudo systemctl enable fix-steam-perms.service

# minimize image size by squashing OS to 1 layer.
FROM scratch
Expand Down

0 comments on commit 6d898aa

Please sign in to comment.