From b68f77b404af4b2200fd3229a4fd16ef09d0edf9 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 22 Mar 2019 20:30:06 +0100 Subject: [PATCH] launchd: ensure user LaunchAgents exist Apparently this doesn't exist by default, so make sure it's created first. Fixes #134 --- modules/system/launchd.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/system/launchd.nix b/modules/system/launchd.nix index 1d57ce3d..f2cee96c 100644 --- a/modules/system/launchd.nix +++ b/modules/system/launchd.nix @@ -128,6 +128,9 @@ in ${concatStringsSep "\n" (launchdVariables config.launchd.user.envVariables)} + ${optionalString (builtins.length userLaunchAgents > 0) '' + mkdir -p ~/Library/LaunchAgents + ''} ${concatMapStringsSep "\n" (attr: userLaunchdActivation attr.target) userLaunchAgents} for f in $(ls /run/current-system/user/Library/LaunchAgents 2> /dev/null); do