Add proton-launch
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
17
hosts/common/configs/user/gui/gaming/proton/default.nix
Normal file
17
hosts/common/configs/user/gui/gaming/proton/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.persistence."/persist/state"."${home}/.local/share/proton" = { };
|
||||||
|
|
||||||
|
home-manager.users.${user}.home.packages = [
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "proton-launch";
|
||||||
|
runtimeInputs = with pkgs; [ coreutils ];
|
||||||
|
runtimeEnv = {
|
||||||
|
PROTON = lib.makeSearchPathOutput "steamcompattool" "" [ pkgs.proton-ge-bin ];
|
||||||
|
STEAM_RUN = lib.meta.getExe pkgs.steam-run;
|
||||||
|
};
|
||||||
|
text = builtins.readFile ./proton-launch.sh;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
15
hosts/common/configs/user/gui/gaming/proton/proton-launch.sh
Normal file
15
hosts/common/configs/user/gui/gaming/proton/proton-launch.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
if [ "$#" -lt 1 ]; then
|
||||||
|
echo "Usage: $0 <executable-path> [args...]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PROTON_DATA="$HOME/.local/share/proton"
|
||||||
|
|
||||||
|
exec="$(realpath "$1")"
|
||||||
|
name="$(basename "$exec")"
|
||||||
|
mkdir -p "$PROTON_DATA/$name"
|
||||||
|
|
||||||
|
export STEAM_COMPAT_DATA_PATH="$PROTON_DATA/$name"
|
||||||
|
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$PROTON"
|
||||||
|
|
||||||
|
"$STEAM_RUN" "$PROTON/proton" run "$exec" "${@:2}" >/dev/null 2>&1 & disown
|
@@ -66,6 +66,7 @@ in
|
|||||||
(import ../../../common/configs/user/gui/gaming/gamescope { inherit user home; })
|
(import ../../../common/configs/user/gui/gaming/gamescope { inherit user home; })
|
||||||
(import ../../../common/configs/user/gui/gaming/steam { inherit user home; })
|
(import ../../../common/configs/user/gui/gaming/steam { inherit user home; })
|
||||||
(import ../../../common/configs/user/gui/gaming/prismlauncher { inherit user home; })
|
(import ../../../common/configs/user/gui/gaming/prismlauncher { inherit user home; })
|
||||||
|
(import ../../../common/configs/user/gui/gaming/proton { inherit user home; })
|
||||||
(import ../../../common/configs/user/gui/gaming/wivrn { inherit user home; })
|
(import ../../../common/configs/user/gui/gaming/wivrn { inherit user home; })
|
||||||
(import ../../../common/configs/user/gui/gtk { inherit user home; })
|
(import ../../../common/configs/user/gui/gtk { inherit user home; })
|
||||||
(import ../../../common/configs/user/gui/hyprland { inherit user home; })
|
(import ../../../common/configs/user/gui/hyprland { inherit user home; })
|
||||||
|
Reference in New Issue
Block a user