Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically override settings at launch #863

Open
2 tasks done
GetPsyched opened this issue Dec 18, 2023 · 1 comment
Open
2 tasks done

Dynamically override settings at launch #863

GetPsyched opened this issue Dec 18, 2023 · 1 comment
Labels
enhancement Feature requests. low-priority Low priority to be addressed.

Comments

@GetPsyched
Copy link

The Problem

I am creating a NixOS module that allows for the installation and configuration of ATLauncher. It would look something like this for an end-user:

programs.atlauncher = {
  enable = true;

  theme = "One Dark";

  settings = {
    enableConsole = false;
    enableTrayMenu = false;
    keepLauncherOpen = false;
  };
};

However, under the hood, this creates a symlink to **WORKING_DIR/configs/ATLauncher.json which is read-only (due to the way Nix works). This causes any imperative configuration within ATLauncher to never work as it cannot write to a read-only file.

When I saw the --config-override flag in ATLauncher, I thought this would solve this as the NixOS module could simply append all the configuration to that flag instead of overriding ATLauncher.json. However, this was apparently for internal configuration and not launcher settings.

The Solution

A --settings-override flag in ATLauncher to set launcher settings which accepts a JSON string, much like --config-override does.

Additional Information

No response

Have you checked this issue doesn't already exist?

  • I am sure this issue doesn't exist already

Code of Conduct

  • I agree to follow this project's Code of Conduct
@GetPsyched GetPsyched added enhancement Feature requests. triage Issue has not been looked at to classify and validate. labels Dec 18, 2023
@RyanTheAllmighty RyanTheAllmighty added low-priority Low priority to be addressed. and removed triage Issue has not been looked at to classify and validate. labels Jan 7, 2024
@eljamm
Copy link

eljamm commented May 16, 2024

I think adding this would solve a lot of issues with ATlauncher on NixOS.

For example, we can force "useJavaProvidedByMinecraft": false, to make the game always open with the system-provided java, or toggle settings that depend on whether something is installed or not, such as "enableFeralGamemode".

Also, perhaps we can add a setting to pass in specific java instances without having to search for them (related to #519).
For example: javaPaths: "/nix/store/openjdk-21/lib/openjdk:/nix/store/openjdk-8/lib/openjdk"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. low-priority Low priority to be addressed.
Development

No branches or pull requests

3 participants