From 9b623aa532061c891ebbe10f04d5a31c3dce7200 Mon Sep 17 00:00:00 2001 From: MoritzBoehme Date: Tue, 14 Sep 2021 23:04:29 +0200 Subject: [PATCH] added gaming --- bin/updatePGEfast.sh | 30 ++++++++++++++++++++++++++++++ modules/default.nix | 1 + modules/gaming/default.nix | 9 +++++++++ 3 files changed, 40 insertions(+) create mode 100644 bin/updatePGEfast.sh create mode 100644 modules/gaming/default.nix diff --git a/bin/updatePGEfast.sh b/bin/updatePGEfast.sh new file mode 100644 index 0000000..d1d7819 --- /dev/null +++ b/bin/updatePGEfast.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +baseuri="https://github.com/GloriousEggroll/proton-ge-custom/releases/download" +latesturi="https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest" +dstpath="$HOME/.steam/root/compatibilitytools.d" + + + latestversion="$(curl -s $latesturi | egrep -m1 "tag_name" | cut -d \" -f4)" + if [[ -d $dstpath/Proton-$latestversion ]] + then + echo "Proton $latestversion is the latest version and is already installed." + echo "Exiting..." + exit 0 + else + echo "Proton $latestversion is the latest version and is not installed yet." + echo "Installing Proton $latestverion" + url=$(curl -s $latesturi | egrep -m1 "browser_download_url.*Proton" | cut -d \" -f4) + fi + +rsp="$(curl -sI "$url" | head -1)" +echo "$rsp" | grep -q 302 || { + echo "$rsp" + exit 1 +} + +[ -d "$dstpath" ] || { + mkdir "$dstpath" + echo [Info] Created "$dstpath" +} + +curl -sL "$url" | tar xfzv - -C "$dstpath" \ No newline at end of file diff --git a/modules/default.nix b/modules/default.nix index f513ef3..24e5a4a 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -5,6 +5,7 @@ ./apps ./cli ./desktop + ./gaming ./services ]; diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix new file mode 100644 index 0000000..018703e --- /dev/null +++ b/modules/gaming/default.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + home-manager.users.moritz = { + home.packages = with pkgs; [ + steam + ]; + }; +}