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

[Enhancement] Don't create "/Applications/Nix Apps" unless necessary #1294

Open
wzxu opened this issue Jan 23, 2025 · 2 comments
Open

[Enhancement] Don't create "/Applications/Nix Apps" unless necessary #1294

wzxu opened this issue Jan 23, 2025 · 2 comments

Comments

@wzxu
Copy link

wzxu commented Jan 23, 2025

Due to various reasons such as Spotlight discoverability and the zapping mechanism, I find Homebrew Cask to be a better way of managing GUI apps, so I only let Nix handle CLI apps. However, the symlink "/Applications/Nix Apps" always gets created even though there's no need for it and the target directory is empty.

I found the file that's responsible for creating it here, and, with my limited Nix knowledge, I tried to set system.activationScripts.applications.enable = false or system.activationScripts.applications.text = "" in my nix.flake, neither of which worked of course.

So I'm wondering if it's possible some change is made in nix-darwin so that this symlink is only created if there exists at least one GUI app installed by Nix?

@sdht0
Copy link

sdht0 commented Feb 10, 2025

This seems to be working for me:

{
  lib,
  ...
}:
{
  config = {
    system.activationScripts.applications.text = lib.mkForce "";
  };
}

@wzxu
Copy link
Author

wzxu commented Feb 11, 2025

@sdht0 It works. Thanks for the hint!

I'll leave the ticket open in case there's some improvement to be made here.
Or the maintainers can close it as "won't fix" if they deem so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants