This is basically a better version of `targets.darwin.linkApps` that
copy apps instead of linking (hence the name). While this is a
convoluted approach, it works with Spotlight, where the previous
approach doesn't. This is also the approach adopted by nix-darwin, see
PR: https://github.com/nix-darwin/nix-darwin/pull/1396.
There are a few particularities about this implementation, for one the
flags we use in rsync are different since we are not using root to copy
the apps to `~/Applications`. This may or may not cause some issues with
specific applications so further testing will be needed. Also the check
for App Management permission needs root (via sudo), so this check is
gated behind a flag that can be disabled if needed.
Fix: #1341.
Before, loading a module would be guarded by an optional platform
condition. This made it possible to avoid loading and evaluating a
module if it did not support the host platform.
Unfortunately, this made it impossible to share a single configuration
between GNU/Linux and Darwin hosts, which some wish to do.
This removes the conditional load and instead inserts host platform
assertions in the modules that are platform specific.
Fixes#1906
Add new options Darwin options:
- `targets.darwin.defaults`
This adds options for configuring macOS through the `defaults(1)` system.
This option can be used to manipulate a vast majority of user settings for macOS
and its applications.
This is implemented using freeform modules and includes additional descriptions
and type information for some useful options.
- `targets.darwin.keybindings`
This adds options for configuring the default keybindings for macOS text fields.
- `targets.darwin.search`
This adds options for configuring the default search engine for macOS.