Files
system-config/home-manager/features/gaming.nix

133 lines
4.4 KiB
Nix

{ pkgs, local, ... }:
let
# TODO: This is an attempt to patch the desktop file by actually using the old
# one so I don't have to put in all the options like below. This will generate
# the correct file, however, xdg.dataFile."applications/wowup-cf.desktop"
# doesn't seem to actually overrwite it, even with force = true.
# patched-desktop =
# pkgs.runCommand "patched-wowup-cf-desktop"
# {
# desktop = "${pkgs.wowup-cf}/share/applications/wowup-cf.desktop";
# }
# ''
# mkdir -p $out
# substitute "$desktop" "$out/wowup-cf.desktop" \
# --replace-fail 'Exec=wowup-cf' 'Exec=wowup-cf --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu'
# '';
warcraftLogsUploader = pkgs.fetchurl {
name = "warcraftlogs-client";
url = "https://github.com/RPGLogs/Uploaders-warcraftlogs/releases/download/v8.17.47/warcraftlogs-v8.17.47.AppImage";
sha256 = "1aypr3ffy6lq0qj64d48c7n54nfs72404xb2kpxsw5slqh66imw6";
};
warcraftLogsIcon = pkgs.fetchurl {
name = "warcraftlogs-icon";
url = "https://assets.rpglogs.com/img/warcraft/favicon.png";
sha256 = "0hil7rj7a0bmls0h4w3xmfzcp1gm5yfagbziv1967lmy70ri0bc9";
};
raiderioClient = pkgs.fetchurl {
name = "raiderio-client";
url = "https://raider.io/client/download/linux";
sha256 = "0wcw53bgr9dr02x1ci2jlnc5irpiqxqxgs2hpbrsnj67q50nvlm9";
};
raiderioIcon = pkgs.fetchurl {
name = "raiderio-icon";
url = "https://cdn.raiderio.net/images/brand/Mark_2ColorWhite.png";
sha256 = "13311vi04lv6bp7jvnhinbcfah4ghn9h85cl3wzysz3aaxs73988";
};
curseForgeClient = pkgs.fetchurl {
name = "curseforge-client";
url = "https://curseforge.overwolf.com/downloads/curseforge-latest-linux.AppImage";
sha256 = "0w4snj0f0lpdc2z0iq8r10add49jaa3z10xz2cpmfh1dmm57yvlf";
};
in
{
home.packages = with pkgs; [
# Gaming
mangohud
(lutris.override {
extraPkgs = pkgs: [
winetricks # Needed for bnet setup.
vulkan-tools # Needed for bnet setup
];
})
protonup-ng
protonplus
protontricks
vulkan-tools # useful for debugging Vulkan issues
# WoW addon updater
wowup-cf
];
# xdg.dataFile."applications/wowup-cf.desktop" = {
# force = true;
# source = "${patched-desktop}/wowup-cf.desktop";
# };
# wowup needs options to work under wayland.
xdg.desktopEntries = {
wowup-cf = local.electronDesktopEntry {
name = "WowUp";
exec = "wowup-cf --no-sandbox";
terminal = false;
type = "Application";
icon = "wowup-cf";
comment = "World of Warcraft addon updater";
categories = [
"Game"
];
};
warcraftLogs = {
name = "WarcraftLogs";
exec = "${pkgs.appimage-run}/bin/appimage-run ${warcraftLogsUploader}";
terminal = false;
type = "Application";
icon = "${warcraftLogsIcon}";
comment = "WarcraftLogs uploader";
categories = [ "Game" ];
};
raiderio = {
name = "Raider.io";
exec = "${pkgs.appimage-run}/bin/appimage-run ${raiderioClient}";
terminal = false;
type = "Application";
icon = "${raiderioIcon}";
comment = "Raider.io Client";
categories = [ "Game" ];
};
curseforge = {
name = "Curseforge";
exec = "${pkgs.appimage-run}/bin/appimage-run ${curseForgeClient}";
terminal = false;
type = "Application";
comment = "Curseforge Client";
categories = [ "Game" ];
};
};
# TODO: Merge into config
# wayland.windowManager.hyprland.settings.windowrule = [
# # Set up full-screen games on monitor 1 (since window 0 is the vertical one.)
# # "match:class ^steam_app_\d+$, float"
# "match:class ^steam_app_\d+$, fullscreen 1, monitor 1"
# "match:class ^steam_app_\d+$, center on"
#
# # Make sure WoW spawns on the right monitor and that Battlenet floats so it renders correctly
# "match:title ^World of Warcraft$, monitor 1"
# "match:title ^World of Warcraft$, fullscreen on"
# "match:title ^Battle.net$, monitor 1"
# "match:title ^Battle.net$, float on"
#
# # Make Balatro into a regular window.
# "match:title ^Balatro$, monitor 1"
# "match:title ^Balatro$, tile on"
#
# # Load Cyberpunk 2077 on the right monitor.
# "match:class steam_app_1091500, monitor 1"
# "match:class steam_app_1091500, fullscreen on"
# ];
}