mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
targets.darwin: add module
Currently, this module makes sure that `/Applications` directories for packages in `home.packages` get linked into the user's environment.
This commit is contained in:
parent
bd4c2b0651
commit
d3aee544b6
7 changed files with 39 additions and 1 deletions
14
modules/targets/darwin.nix
Normal file
14
modules/targets/darwin.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin {
|
||||
# Install MacOS applications to the user environment.
|
||||
home.file."Applications/Home Manager Apps".source = let
|
||||
apps = pkgs.buildEnv {
|
||||
name = "home-manager-applications";
|
||||
paths = config.home.packages;
|
||||
pathsToLink = "/Applications";
|
||||
};
|
||||
in "${apps}/Applications";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue