System/modules/linux/programs/games.nix

54 lines
1.5 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
2023-02-08 22:28:04 -05:00
glfw-patched =
pkgs.callPackage ../../../packages/glfw-minecraft-wayland { };
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
glfw-patched
];
unstable-packages =
2023-03-02 00:19:20 -05:00
with inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}"; [
2022-06-23 02:57:41 -04:00
# Packwiz for maintaing modpacks
packwiz
2023-03-02 00:19:20 -05:00
prismlauncher
2022-06-23 02:57:41 -04:00
];
in stable-packages ++ unstable-packages;
2023-06-16 21:38:39 -04:00
# 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 ];
});
};
2022-07-18 16:37:10 -04:00
# Install steam
2023-06-16 21:38:39 -04:00
programs.steam = {
enable = true;
gamescopeSession = {
enable = true;
args = [ "--rt" ];
2022-11-29 00:19:59 -05:00
};
};
2022-06-23 02:57:41 -04:00
};
}