System/modules/linux/programs/games.nix

54 lines
1.5 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
let np = config.nathan.programs;
in with lib; {
config = mkIf np.games {
environment.systemPackages = let
# https://github.com/Admicos/minecraft-wayland
glfw-patched =
pkgs.callPackage ../../../packages/glfw-minecraft-wayland { };
stable-packages = with pkgs; [
# Dwarf fortress
(dwarf-fortress-packages.dwarf-fortress-full.override {
enableFPS = true;
})
# Prism Launcher minecraft stuff
glfw-patched
];
unstable-packages =
with inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}"; [
# Packwiz for maintaing modpacks
packwiz
prismlauncher
];
in stable-packages ++ unstable-packages;
# Setup gamescope
programs.gamescope = {
enable = true;
package = pkgs.gamescope.overrideAttrs (old: {
src = let
vals = builtins.fromJSON
(builtins.readFile ../../../sources/gamescope.json);
in pkgs.fetchFromGitHub {
owner = "ValveSoftware";
repo = "gamescope";
rev = vals.rev;
hash = vals.hash;
fetchSubmodules = true;
};
patches = [ ];
buildInputs = with pkgs;
old.buildInputs
++ [ glm xorg.xcbutilwm xorg.xcbutilerrors gbenchmark ];
});
};
# Install steam
programs.steam = {
enable = true;
gamescopeSession = {
enable = true;
args = [ "--rt" ];
};
};
};
}