1
0
Fork 0
nixos-config/home-manager/roles/games.nix

70 lines
2 KiB
Nix
Raw Normal View History

2021-05-18 14:33:28 +00:00
{ pkgs, lib, config, ... }:
let
2020-07-13 20:51:45 +00:00
gw2dir = "${config.home.homeDirectory}/volatile/GW2";
wine = pkgs.wineWowPackages.staging;
gw2env = ''
2021-05-18 14:33:28 +00:00
cd ${gw2dir}
export MESA_GLSL_CACHE_DISABLE=0
export MESA_GLSL_CACHE_DIR="${gw2dir}/shader_cache"
export mesa_glthread=true
2020-07-13 20:51:45 +00:00
2021-05-18 14:33:28 +00:00
# Wine Settings
export DXVK_HUD=fps,frametimes
export DXVK_LOG_LEVEL=none
#export DXVK_STATE_CACHE=1 default
export DXVK_STATE_CACHE_PATH="${gw2dir}/dxvk_state_cache/"
export WINEDEBUG=-all
export WINEARCH=win64
export WINEPREFIX="${gw2dir}/data"
export STAGING_SHARED_MEMORY=1
export WINEESYNC=1
2020-07-13 20:51:45 +00:00
'';
2020-10-11 13:02:30 +00:00
dxvk = fetchTarball {
2021-05-18 14:33:28 +00:00
url = "https://github.com/doitsujin/dxvk/releases/download/v1.7.2/dxvk-1.7.2.tar.gz";
sha256 = "07q9fsrvjq2ndnhd93000jw89bkaw6hdi2yhl4d6j8n4ak71r8pv";
};
gw2installdxvk = pkgs.writeShellScriptBin "gw2-install-dxvk" ''
${gw2env}
cd ${dxvk}
bash ./setup_dxvk.sh install
2020-10-11 13:02:30 +00:00
'';
2020-07-13 20:51:45 +00:00
gw2setup = pkgs.writeShellScriptBin "gw2-setup" ''
2021-05-18 14:33:28 +00:00
mkdir -p ${gw2dir}
${gw2env}
echo Launching winecfg to configure desktop window
${wine}/bin/winecfg
echo Installing dxvk
${gw2installdxvk}/bin/gw2-install-dxvk
echo Downloading installer
wget https://account.arena.net/content/download/gw2/win/64 -O Gw2Setup-64.exe
echo Running installer
${wine}/bin/wine64 ./Gw2Setup-64.exe
2020-07-13 20:51:45 +00:00
'';
gw2run = pkgs.writeShellScriptBin "gw2" ''
2021-05-18 14:33:28 +00:00
${gw2env}
cd "${gw2dir}/data/drive_c/Guild Wars 2"
${wine}/bin/wine64 ./Gw2-64.exe $@ -autologin
'';
2020-07-13 20:51:45 +00:00
in
2021-05-18 14:33:28 +00:00
{
2021-07-06 11:04:16 +00:00
#dconf.settings."org/gnome/settings-daemon/plugins/media-keys" = {
#mic-mute = lib.mkForce [ ];
#next = lib.mkForce [ ];
#play = lib.mkForce [ ];
#previous = lib.mkForce [ ];
#screensaver = lib.mkForce [ ];
#volume-down = lib.mkForce [ ];
#volume-up = lib.mkForce [ ];
#};
2020-06-02 01:50:36 +00:00
2020-05-05 23:40:57 +00:00
home.packages = builtins.attrValues {
2021-03-08 13:45:30 +00:00
#factorio = pkgs.factorio.override {
# username = "maralorn";
# token = pkgs.privateValue "" "factorio";
#};
2021-05-28 16:21:44 +00:00
inherit (pkgs) steam minecraft;
2020-10-11 13:02:30 +00:00
inherit gw2run gw2setup wine gw2installdxvk;
2020-05-05 23:40:57 +00:00
};
}