From fc2c8b9cf87eb9f2a0cd78c51afb5d5e583cd121 Mon Sep 17 00:00:00 2001 From: zephrynis Date: Fri, 31 Jul 2026 10:27:10 +0100 Subject: [PATCH] gaming: install Minecraft Bedrock via nix-flatpak Add the nix-flatpak flake input and wire its NixOS module into the gaming module to declaratively install io.mrarm.mcpelauncher from Flathub. The Flatpak build tracks the newer, pairip-protected Bedrock releases ahead of the nixpkgs mcpelauncher package. Co-Authored-By: Claude Opus 4.8 (1M context) --- flake.lock | 16 ++++++++++++++++ flake.nix | 5 +++++ modules/gaming.nix | 14 +++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 8c6b43f..f496bc8 100644 --- a/flake.lock +++ b/flake.lock @@ -137,6 +137,21 @@ "type": "github" } }, + "nix-flatpak": { + "locked": { + "lastModified": 1783368811, + "narHash": "sha256-0H8jDwR4Kegb3heaTrH1ftbgKfZVDT8JE+46uXxDy/Q=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "20d42f0ee98c9fe9f85e8d1de474f1409ed10d05", + "type": "github" + }, + "original": { + "owner": "gmodena", + "repo": "nix-flatpak", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1784796856, @@ -203,6 +218,7 @@ "home-manager": "home-manager", "hyprland-preview-share-picker": "hyprland-preview-share-picker", "illogical-flake": "illogical-flake", + "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", "spicetify-nix": "spicetify-nix" } diff --git a/flake.nix b/flake.nix index 3297c90..74d9e70 100644 --- a/flake.nix +++ b/flake.nix @@ -48,6 +48,11 @@ url = "github:Gerg-L/spicetify-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # Declarative Flatpak app/remote management (extends services.flatpak). Used + # for the Minecraft Bedrock launcher, whose Flatpak build tracks newer, + # pairip-protected Bedrock releases ahead of the nixpkgs package. + nix-flatpak.url = "github:gmodena/nix-flatpak"; }; outputs = { nixpkgs, home-manager, ... }@inputs: { diff --git a/modules/gaming.nix b/modules/gaming.nix index 8423942..bc8f830 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -1,6 +1,8 @@ -{ pkgs, ... }: +{ inputs, pkgs, ... }: { + imports = [ inputs.nix-flatpak.nixosModules.nix-flatpak ]; + programs.steam = { enable = true; remotePlay.openFirewall = true; @@ -17,4 +19,14 @@ prismlauncher protonup-qt ]; + + # Minecraft Bedrock via mcpelauncher (unofficial; runs the Android ARM build + # through a libc shim — you must own Bedrock on Google Play). Installed as a + # Flatpak (io.mrarm.mcpelauncher) rather than the nixpkgs package, whose + # launcher lagged the newer, pairip-protected Bedrock releases. nix-flatpak + # adds the Flathub remote (its default) and installs the app on activation. + services.flatpak = { + enable = true; + packages = [ "io.mrarm.mcpelauncher" ]; + }; }