Files
nixos/home-manager/gaming.nix

69 lines
2.1 KiB
Nix

{ pkgs, inputs, ... }:
let
pkgs_unstable = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}";
# https://simpler-website.pages.dev/html/2021/1/wine-environment-variables/#wineesync
wine-wrapped = (pkgs.writeShellApplication {
name = "wine";
runtimeInputs = [ pkgs_unstable.wineWowPackages.stagingFull ];
text = ''
export WINEPREFIX="''${WINEPREFIX:-"$HOME/Games/wine/default"}"
wine "$@"
'';
});
# https://github.com/GloriousEggroll/proton-ge-custom?tab=readme-ov-file#modification
# These aren't yet documented in the README:
# PROTON_MEDIA_USE_GST=1 will tell proton to use the winegstreamer backend instead of the default winedmo backend (the winedmo backend was introduced in Proton 10 and is the current preferred video playback method). This can be useful for games with videos that may have worked in Proton 9 but regressed in Proton 10.
# PROTON_GST_VIDEO_ORIENTATION=<orientation> can be any of the following: vertical-flip, horizontal-flip, rotate-180, automatic. This is useful if some games have videos that are upside down or otherwise not oriented correctly.
umu-wrapped = (pkgs.writeShellApplication {
name = "umu-run";
runtimeInputs = [ pkgs_unstable.umu-launcher ];
text = ''
export PROTONPATH="''${PROTONPATH:-"GE-Proton"}"
export PROTON_ENABLE_WAYLAND="''${PROTON_ENABLE_WAYLAND:-"0"}"
umu-run "$@"
'';
});
in
{
home.packages = with pkgs;[
# Wine / Proton
umu-wrapped
wine-wrapped
pkgs_unstable.winetricks
# proton with ja_JP
(pkgs.writeShellApplication {
name = "umu-ja";
runtimeInputs = [ umu-wrapped ];
text = "LANG=ja_JP.utf8 umu-run \"$@\"";
})
# wine with ja_JP
(pkgs.writeShellApplication {
name = "wine-ja";
runtimeInputs = [ wine-wrapped ];
text = "LANG=ja_JP.utf8 wine \"$@\"";
})
bottles
(heroic.override {
extraPkgs = pkgs: [
pkgs.gamescope
];
})
# Steam
steamguard-cli
# Emulators
pkgs_unstable.ryubing
mgba
# Cheat engine
scanmem
];
}