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

Generate allowed_symlinks.txt when symlinks are used in module #92

Open
Infinidoge opened this issue Aug 8, 2024 · 1 comment · May be fixed by #117
Open

Generate allowed_symlinks.txt when symlinks are used in module #92

Infinidoge opened this issue Aug 8, 2024 · 1 comment · May be fixed by #117
Labels
enhancement New feature or request module Topic: The minecraft-servers module

Comments

@Infinidoge
Copy link
Owner

See the 1.20 Pre-release 7 patch notes and corresponding help article.

The naïve solution would be to do

symlinks = {
  "allowed_symlinks.txt" = pkgs.writeText "allowed_symlinks.txt" "/nix/store";
};

An ideal solution would be

alowedSymlinks = [ "/nix/store" ];

This would solve the problem brought up in #74.

@Infinidoge Infinidoge added enhancement New feature or request module Topic: The minecraft-servers module labels Aug 8, 2024
@Misterio77
Copy link
Contributor

This should work too (format from 7408a56), and has all the module-system niceties:

symlinks = {
  "allowed_symlinks.txt" = {
    value = ["/nix/store"];
    format = {
      type = lib.types.listOf str;
      generate = name: value: pkgs.writeText name (lib.concatStringsSep "\n" value);
    };
  };
};

But a convenience allowedSymlinks would be nice.

@Misterio77 Misterio77 linked a pull request Dec 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module Topic: The minecraft-servers module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants