System/modules/linux/programs/games.nix

74 lines
2.3 KiB
Nix
Raw Normal View History

2022-06-23 02:57:41 -04:00
{ config, lib, pkgs, inputs, ... }:
let np = config.nathan.programs;
in with lib; {
2022-06-23 02:57:41 -04:00
config = mkIf np.games {
environment.systemPackages = let
# https://github.com/Admicos/minecraft-wayland
glfw-patched = pkgs.glfw-wayland.overrideAttrs (attrs: {
2023-02-08 21:57:48 -05:00
src = pkgs.fetchzip {
version = "3.4.0";
url =
"https://github.com/glfw/glfw/archive/62e175ef9fae75335575964c845a302447c012c7.tar.gz";
sha256 = "sha256-GiY4d7xadR0vN5uCQyWaOpoo2o6uMGl1fCcX4uDGnks=";
};
buildInputs = with pkgs;
with pkgs.xorg; [
wayland
wayland-protocols
libxkbcommon
libX11
libXrandr
libXinerama
libXcursor
libXi
libXext
];
patches = [
../../../patches/minecraft/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
../../../patches/minecraft/0004-wayland-fix-broken-opengl-screenshots-on-mutter.patch
2023-02-08 21:57:48 -05:00
../../../patches/minecraft/0005-Add-warning-about-being-an-unofficial-patch.patch
# ../../../patches/minecraft/0006-Don-t-crash-getting-scancode-name.patch
../../../patches/minecraft/0007-Platform-Prefer-Wayland-over-X11.patch
2022-06-23 02:57:41 -04:00
];
});
stable-packages = with pkgs; [
# Dwarf fortress
(dwarf-fortress-packages.dwarf-fortress-full.override {
enableFPS = true;
})
2022-10-18 09:54:58 -04:00
# Prism Launcher minecraft stuff
inputs.prismlauncher.packages."${system}".prismlauncher
glfw-patched
2022-11-29 00:19:59 -05:00
gamescope
];
unstable-packages =
with inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}";
[
2022-06-23 02:57:41 -04:00
# Packwiz for maintaing modpacks
packwiz
];
in stable-packages ++ unstable-packages;
2022-07-18 16:37:10 -04:00
# Install steam
programs.steam.enable = true;
2022-11-29 00:19:59 -05:00
# Make steam work with gamescope
nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override {
extraPkgs = pkgs:
with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
gtk3
];
};
};
2022-06-23 02:57:41 -04:00
};
}