1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00
Commit graph

6 commits

Author SHA1 Message Date
toonn
ed1e73d01e
applications: Drop store prefix to generalize
While the Nix store is almost always at `/nix/store`, we shouldn't
assume it to be. Checking only the trailing part of the link is less
exact but removes this bad assumption.

I also added a check for the symlink's contents when overwriting it to
more accurately check whether we own it and should replace it.
2022-09-13 14:57:50 +02:00
toonn
fbe795f39d
applications: Symlink Nix Apps to /Applications
This PR supercedes #226.

So far application bundles were always linked to `~/Applications` or
`~/Applications/Nix Apps` if the former was an existing directory.

In nix-community/home-manager#1341 a conflict was found with suggested
new Home Manager behavior, where applications installed through Home
Manager would end up in `~/Applications/Home Manager Apps`. This was in
an attempt to make them discoverable through Spotlight but further
investigation suggest Spotlight does not pick up symlinked apps (details
in the issue).

However, there are other programs that expect to be able to write to
`~/Applications` so taking over the directory is unfortunate.

PR #226 dropped linking `~/Applications` and instead made sure the
directory exists so we can always link in `~/Applications/Nix Apps`.

After further discussion in #macos:nixos.org we came to the conclusion
that we shouldn't link applications to a user directory at all. Since we
manage packages for multiple users, application bundles should go in
`/Applications`.

Because previous code will likely leave a symlink at
`~/Applications/{,Nix Apps}`, which will become dangling once the path
it links to is garbage collected from the store we test to see if a link
exists and it conforms to the path we're expecting and if it does remove
it.
2022-09-13 14:57:46 +02:00
Nicolas Berbiche
9c76fbf20f
Disable taking control of ~/Applications folder
Programs like Steam add applications to ~/Applications and such.

This commit disables linking ~/Applications to nix-darwin Applications
in the /nix/store and makes nix-darwin use a subfolder within
~/Applications.
2022-09-13 14:57:46 +02:00
Chris Hodapp
b26b1e89c1 Make symlink within ~/Applications if it exists instead of skipping 2017-06-14 13:12:12 -07:00
Daiderd Jordan
cee2bb93cc
applications: fix activation 2017-05-20 14:38:32 +02:00
Daiderd Jordan
290b1d8aad
system-packages: link applications to ~/Applications 2017-05-20 14:23:05 +02:00