This commit is contained in:
4DBug committed 2026-10-25 10:08:15 -05:00
1 parent c86ee98def
commit a3163cdd43
29 files changed
+693 -231

No files matched your search

+6 -2
View File
@@ -14,6 +14,7 @@
{ pkgs, config, ... }:
let
home = config.home.homeDirectory;
gameDir = "${home}/media/games/minecraft";
inherit (pkgs) lib symlinkJoin makeWrapper;
fetch = map (url: rec {
@@ -56,7 +57,7 @@
appArgs = [
"--gameDir"
"${home}/.local/share/minecraft"
gameDir
];
}]);
@@ -65,8 +66,11 @@
paths = [ base ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
# the launch script cd's into its own --gameDir (default: $PWD), so pin it too
wrapProgram $out/bin/minecraft \
--set XDG_DATA_HOME "${home}/.local/share/minecraft"
--run 'mkdir -p "${gameDir}"' \
--add-flags '--gameDir "${gameDir}"' \
--set XDG_DATA_HOME "${gameDir}"
'';
};
in
+39
View File
@@ -0,0 +1,39 @@
{
# Roblox client manager. The package is built privately by Gitea Actions on box
# (repo <owner>/roblox) and served from the private attic cache; nothing here is
# fetchable without the tokens in ~/.config/nix/{netrc,roblox.conf}.
den.aspects.software.gaming = {
# roblox.conf holds the cache substituter, its public key and `netrc-file`.
nixos = { config, host, ... }: {
nix.extraOptions = "!include ${config.users.users.${host.owner}.home}/.config/nix/roblox.conf";
};
homeManager = { pkgs, host, ... }: let
roblox = pkgs.writeShellApplication {
name = "roblox-manager";
runtimeInputs = with pkgs; [ curl coreutils ];
text = ''
state="''${XDG_STATE_HOME:-$HOME/.local/state}/roblox"
mkdir -p "$state"
# Follow the latest CI build; keep the last one when offline.
if path=$(curl -fsS --max-time 10 --netrc-file "$HOME/.config/nix/netrc" \
"https://git.${host.domain}/${host.owner}/roblox/raw/branch/release/path") \
&& [[ "$(readlink "$state/current" || true)" != "$path" ]]; then
nix-store --realise "$path" --add-root "$state/current" >/dev/null
fi
[[ -e "$state/current" ]] || { echo "roblox-manager: no build available yet" >&2; exit 1; }
exec "$state/current/bin/roblox" "$@"
'';
};
in {
home.packages = [ roblox ];
xdg.desktopEntries.roblox-manager = {
name = "Roblox Manager";
comment = "Roblox client manager";
exec = "roblox-manager";
icon = "applications-games";
categories = [ "Game" ];
};
};
};
}