Working Minecraft Setup
This commit is contained in:
parent
4c37ea841c
commit
9d83d95186
3 changed files with 12 additions and 40 deletions
|
@ -3,7 +3,7 @@ _: {
|
||||||
../../../options/boot/grub-boot.nix
|
../../../options/boot/grub-boot.nix
|
||||||
../../../options/desktop/fonts.nix
|
../../../options/desktop/fonts.nix
|
||||||
../../../options/common/networking.nix
|
../../../options/common/networking.nix
|
||||||
../../../options/common/gpu/nvidia.nix
|
../../../options/common/gpu/nvidia_wayland.nix
|
||||||
../../../options/common/pin-registry.nix
|
../../../options/common/pin-registry.nix
|
||||||
../../../options/common/preserve-system.nix
|
../../../options/common/preserve-system.nix
|
||||||
../../../options/common/bluetooth.nix
|
../../../options/common/bluetooth.nix
|
||||||
|
|
|
@ -1,41 +1,12 @@
|
||||||
{ config, inputs, pkgs, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
username = config.modules.other.system.username;
|
|
||||||
|
|
||||||
# Fetch the GLFW with Wayland patches for Minecraft
|
in
|
||||||
customGLFW = let
|
{
|
||||||
mcWaylandPatchRepo = pkgs.fetchFromGitHub {
|
environment.systemPackages = with pkgs; [
|
||||||
owner = "Admicos";
|
prismlauncher
|
||||||
repo = "minecraft-wayland";
|
glfw-wayland-minecraft # Use these parameters in the prism launcher: -Dfml.earlyprogresswindow=false -Dorg.lwjgl.glfw.libname=/nix/store/ypkdx5844pp1vdw2z2nmnf2nb9kgl0mp-glfw-wayland-minecraft-unstable-2023-06-01/lib/libglfw.so
|
||||||
rev = "370ce5b95e3ae9bc4618fb45113bc641fbb13867";
|
mmex
|
||||||
sha256 = "sha256-RPRg6Gd7N8yyb305V607NTC1kUzvyKiWsh6QlfHW+JE=";
|
];
|
||||||
};
|
|
||||||
mcWaylandPatches = map (name: "${mcWaylandPatchRepo}/${name}")
|
|
||||||
(lib.naturalSort (builtins.attrNames (lib.filterAttrs
|
|
||||||
(name: type:
|
|
||||||
type == "regular" && lib.hasSuffix ".patch" name)
|
|
||||||
(builtins.readDir mcWaylandPatchRepo))));
|
|
||||||
in pkgs.glfw.overrideAttrs (previousAttrs: {
|
|
||||||
patches = previousAttrs.patches ++ mcWaylandPatches;
|
|
||||||
buildInputs = previousAttrs.buildInputs ++ [ pkgs.wayland ];
|
|
||||||
});
|
|
||||||
|
|
||||||
# Minecraft launcher with the custom GLFW
|
|
||||||
minecraftPrismLauncher = pkgs.prismlauncher.override {
|
|
||||||
glfw = customGLFW;
|
|
||||||
};
|
|
||||||
|
|
||||||
in {
|
|
||||||
home-manager.users.${username} = {
|
|
||||||
home.packages = let
|
|
||||||
fenix = inputs.fenix.packages.${pkgs.system};
|
|
||||||
|
|
||||||
in with pkgs; [
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# System-wide installation of Minecraft PrismLauncher
|
|
||||||
environment.systemPackages = [
|
|
||||||
minecraftPrismLauncher
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
WLR_NO_HARDWARE_CURSORS = "1";
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
LIBVA_DRIVER_NAME = "nvidia";
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
__GL_THREADED_OPTIMIZATIONS=0;
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue