nichts/hosts/lars/kronos/programs.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-17 23:10:24 +02:00
{ config, inputs, pkgs, lib, ... }:
2024-04-11 22:14:55 +02:00
let
2024-04-12 22:03:29 +02:00
username = config.modules.other.system.username;
2024-04-17 23:10:24 +02:00
# Fetch the GLFW with Wayland patches for Minecraft
customGLFW = let
mcWaylandPatchRepo = pkgs.fetchFromGitHub {
owner = "Admicos";
repo = "minecraft-wayland";
rev = "370ce5b95e3ae9bc4618fb45113bc641fbb13867";
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;
};
2024-04-11 22:14:55 +02:00
in {
home-manager.users.${username} = {
home.packages = let
fenix = inputs.fenix.packages.${pkgs.system};
in with pkgs; [
];
};
2024-04-17 23:10:24 +02:00
# System-wide installation of Minecraft PrismLauncher
environment.systemPackages = [
minecraftPrismLauncher
];
2024-04-11 22:14:55 +02:00
}