-
-
Notifications
You must be signed in to change notification settings - Fork 506
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
Comments
This seems to be working for me: {
lib,
...
}:
{
config = {
system.activationScripts.applications.text = lib.mkForce "";
};
} |
@sdht0 It works. Thanks for the hint! I'll leave the ticket open in case there's some improvement to be made here. |
How exactly does this work? Does this need to be added to |
@bfeitknecht Yes in For example: { pkgs, inputs, ... }:
{
services.nix-daemon.enable = true;
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings.experimental-features = [ "nix-command" "flakes" ];
};
} Would become: { lib, pkgs, inputs, ... }:
{
services.nix-daemon.enable = true;
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings.experimental-features = [ "nix-command" "flakes" ];
};
system.activationScripts.applications.text = lib.mkForce "";
} |
I really suggest not monkey‐patching activation scripts like this, we can’t really support it and it could lead to unintended problems. I’d be happy to review a PR to |
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
orsystem.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?
The text was updated successfully, but these errors were encountered: