8.nix-darwin/modules
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
..
documentation modules/documentation/default.nix: Fix args warning 2022-01-02 12:45:39 +01:00
environment add escape to shell aliases 2022-06-30 19:21:36 +02:00
examples Fix copypasta in simple example 2022-08-25 09:43:42 -04:00
fonts fonts: replace remaining reference to enableFontDir 2022-04-24 13:36:19 -04:00
launchd Fix launchd options description oddities 2022-08-29 16:09:38 -07:00
lib etc: allow replacing files with known content 2020-06-17 19:23:31 +02:00
misc Move build user options to nix module to improve overlap with NixOS 2022-08-16 10:41:51 -07:00
networking Add separate options for ComputerName, HostName, and LocalHostName 2020-08-31 21:01:47 -07:00
nix Transition to using native floats 2022-08-29 15:39:16 -07:00
programs add escape to shell aliases 2022-06-30 19:21:36 +02:00
security add forward compatibility for literalExample deprecation 2021-10-23 15:06:42 +02:00
services Merge pull request #507 from misuzu/netbird-module 2022-08-29 09:34:23 +01:00
system applications: Symlink Nix Apps to /Applications 2022-09-13 14:57:46 +02:00
time time: skip activation if nothing is enabled 2018-01-12 22:24:34 +01:00
users Move build user options to nix module to improve overlap with NixOS 2022-08-16 10:41:51 -07:00
alias.nix Update def and implementation of nix.package to match NixOS module 2022-08-16 10:41:51 -07:00
homebrew.nix Improve documentation of homebrew module 2022-09-01 10:50:23 -07:00
module-list.nix Add netbird module 2022-08-28 18:42:46 +03:00