From bbcf39a3ae187f42ad48523480869793259d1c75 Mon Sep 17 00:00:00 2001 From: oddlama Date: Tue, 12 Sep 2023 21:30:45 +0200 Subject: [PATCH] feat: use bottles instead of lutris --- users/myuser/graphical/default.nix | 2 +- users/myuser/graphical/games/bottles.nix | 16 +++++++++ users/myuser/graphical/games/lutris.nix | 42 ------------------------ 3 files changed, 17 insertions(+), 43 deletions(-) create mode 100644 users/myuser/graphical/games/bottles.nix delete mode 100644 users/myuser/graphical/games/lutris.nix diff --git a/users/myuser/graphical/default.nix b/users/myuser/graphical/default.nix index 85b63ab..09c7c7c 100644 --- a/users/myuser/graphical/default.nix +++ b/users/myuser/graphical/default.nix @@ -13,7 +13,7 @@ ./sway.nix ] ++ lib.optionals nixosConfig.graphical.gaming.enable [ - ./games/lutris.nix + ./games/bottles.nix ]; home = { diff --git a/users/myuser/graphical/games/bottles.nix b/users/myuser/graphical/games/bottles.nix new file mode 100644 index 0000000..5006589 --- /dev/null +++ b/users/myuser/graphical/games/bottles.nix @@ -0,0 +1,16 @@ +{ + pkgs, + lib, + ... +}: { + home.packages = with pkgs; [ + bottles + winetricks + wineWowPackages.fonts + wineWowPackages.stagingFull + ]; + + home.persistence."/state".directories = [ + ".local/share/bottles" + ]; +} diff --git a/users/myuser/graphical/games/lutris.nix b/users/myuser/graphical/games/lutris.nix deleted file mode 100644 index 448c3af..0000000 --- a/users/myuser/graphical/games/lutris.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - home.packages = with pkgs; [ - (lutris.override { - # Needed to stop ntlm_auth warnings in lutris - extraLibraries = p: [p.jansson]; - }) - - openssl - vulkan-tools - dxvk - wineWowPackages.stable - winetricks - ]; - - home.persistence."/state".directories = [ - ".config/lutris" - ".local/share/lutris" - "Games" - ]; - - xdg.desktopEntries.LeagueOfLegends = { - name = "League of Legends"; - icon = "league-of-legends"; - # XXX: TODO as popup dunst? - exec = toString (pkgs.writeShellScript "league-launcher-script" '' - set -euo pipefail - if [[ "$(sysctl -n abi.vsyscall32)" != 0 ]]; then - echo "Please disable abi.vsyscall32 as root to make the anti-cheat happy:" - echo " sysctl -w abi.vsyscall32=0" - exit 1 - fi - - LUTRIS_SKIP_INIT=1 ${pkgs.lutris}/bin/lutris lutris:rungame/league-of-legends - ''); - categories = ["Game"]; - type = "Application"; - }; -}