aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2020-09-04 16:02:05 +0200
committerRobert Helgesson <robert@rycee.net>2020-09-04 16:02:17 +0200
commita063b73d5cf2d741f5f873897974d1a4c3e36d3d (patch)
tree535b273147ad5a6832b9b41c5400e5e60cd9706e /modules
parentbfc66df13dc941361f5af92eaf88f2ea5db39722 (diff)
parentd3aee544b686a72b2bb7eeb379f72c6b6b2665b7 (diff)
Merge PR #1460
Diffstat (limited to 'modules')
-rw-r--r--modules/modules.nix1
-rw-r--r--modules/targets/darwin.nix14
2 files changed, 15 insertions, 0 deletions
diff --git a/modules/modules.nix b/modules/modules.nix
index b4eb4d4027c..08c978b177d 100644
--- a/modules/modules.nix
+++ b/modules/modules.nix
@@ -189,6 +189,7 @@ let
(loadModule ./services/xscreensaver.nix { })
(loadModule ./services/xsuspender.nix { condition = hostPlatform.isLinux; })
(loadModule ./systemd.nix { })
+ (loadModule ./targets/darwin.nix { condition = hostPlatform.isDarwin; })
(loadModule ./targets/generic-linux.nix { condition = hostPlatform.isLinux; })
(loadModule ./xcursor.nix { })
(loadModule ./xresources.nix { })
diff --git a/modules/targets/darwin.nix b/modules/targets/darwin.nix
new file mode 100644
index 00000000000..0d434234bbb
--- /dev/null
+++ b/modules/targets/darwin.nix
@@ -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";
+ };
+}