2024-02-19 15:33:35 +01:00
|
|
|
|
# SPDX-FileCopyrightText: 2021-2024 Simon Bruder <simon@sbruder.de>
|
2024-01-06 01:19:35 +01:00
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
2024-02-19 15:33:35 +01:00
|
|
|
|
#
|
|
|
|
|
# Steam is installed as a flatpak,
|
|
|
|
|
# as this seems to be the only method that does not force me
|
|
|
|
|
# to spend hours debugging various issues with the client.
|
|
|
|
|
#
|
|
|
|
|
# Installation instructions for steam:
|
|
|
|
|
#
|
|
|
|
|
# 1. Run flatpak install flathub com.valvesoftware.Steam
|
|
|
|
|
# 2. Use Flatseal to revoke all filesystem permissions,
|
|
|
|
|
# development syscalls
|
|
|
|
|
# and bluetooth.
|
|
|
|
|
# 3. Add GDK_SCALE=2 as an environment variable (hack for sway’s Xwayland)
|
|
|
|
|
# 4. If you previously used steam-sandbox,
|
|
|
|
|
# you need to copy the files to the flatpak location.
|
|
|
|
|
# For this, start steam once (you can close it early),
|
|
|
|
|
# so it creates the new structure.
|
|
|
|
|
# Then, run the following commands:
|
|
|
|
|
# rm -rf ~/.var/app/com.valvesoftware.Steam/.local/share/Steam
|
|
|
|
|
# mv ~/.local/share/steam-sandbox/.local/share/Steam ~/.var/app/com.valvesoftware.Steam/.local/share/
|
|
|
|
|
# You might want to copy additional files of games,
|
|
|
|
|
# that do not store files inside of Steam’s directories.
|
|
|
|
|
# Afterwards, you can delete ~/.local/share/steam-sandbox
|
|
|
|
|
#
|
|
|
|
|
# For MangoHud, the following steps are also necessary:
|
|
|
|
|
# 1. Run flatpak install org.freedesktop.Platform.VulkanLayer.MangoHud
|
|
|
|
|
# 2. Add xdg-config/MangoHud:ro as filesystem mount to Steam in Flatseal
|
|
|
|
|
# 4. For Intel Arc systems,
|
|
|
|
|
# add /run/wrappers/bin/intel_gpu_top:ro as filiesystem mount
|
|
|
|
|
# and /run/wrappers/bin to the PATH environment variable in Flatseal
|
|
|
|
|
# 3. Add MANGOHUD=1 as a launch options to all games where MangoHud should be
|
|
|
|
|
# available
|
2021-02-12 21:12:03 +01:00
|
|
|
|
{ lib, nixosConfig, pkgs, ... }:
|
2021-07-26 20:43:52 +02:00
|
|
|
|
let
|
|
|
|
|
cfg = nixosConfig.sbruder.games;
|
|
|
|
|
inherit (nixosConfig.sbruder) unfree;
|
|
|
|
|
in
|
|
|
|
|
lib.mkIf cfg.enable {
|
2023-02-11 22:53:54 +01:00
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
|
unstable.mangohud
|
|
|
|
|
] ++ lib.optionals (cfg.performanceIndex >= 2) [
|
2021-08-07 00:30:49 +02:00
|
|
|
|
mgba
|
|
|
|
|
] ++ lib.optionals (cfg.performanceIndex >= 4) [
|
2021-07-26 20:43:52 +02:00
|
|
|
|
desmume
|
2022-02-23 20:46:33 +01:00
|
|
|
|
unstable.dolphin-emu-beta
|
2023-08-04 22:31:21 +02:00
|
|
|
|
pcsx2
|
2022-08-16 00:27:01 +02:00
|
|
|
|
] ++ lib.optionals (cfg.performanceIndex >= 8) [
|
|
|
|
|
unstable.ryujinx
|
2023-02-11 22:53:54 +01:00
|
|
|
|
] ++ lib.optionals unfree.allowSoftware [
|
2021-10-04 16:33:40 +02:00
|
|
|
|
unstable.osu-lazer-sandbox
|
|
|
|
|
];
|
2021-01-07 18:29:18 +01:00
|
|
|
|
}
|