{ config, pkgs, lib, ... }: let config-path = "${config.xdg.configHome}/OpenRCT2/config.ini"; game-path = "${config.home.homeDirectory}/programs/openrct2"; in { home.packages = with pkgs; [ # RollerCoaster Tycoon 2 libre engine. # Requires game data folder to be provided on first run. # Assets from RollerCoaser Tycoon 1 are set from the options menu. # # See https://archive.org/details/OpenRCT2Assets openrct2 ]; home.activation = { setupOpenRCT2 = lib.hm.dag.entryAfter ["writeBoundary"] '' # Setup RCT2 game path $DRY_RUN_CMD ${pkgs.openrct2}/bin/openrct2 $VERBOSE_ARG set-rct2 ${game-path} # Setup RCT1 game path [ -n "$VERBOSE_ARG" ] && VERBOSE_ARG="--debug" $DRY_RUN_CMD ${pkgs.gnused}/bin/sed --in-place $VERBOSE_ARG 's|^rct1_path.*|rct1_path = "${game-path}"|' ${config-path} ''; }; }