summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2019-03-22 20:30:06 +0100
committerDaiderd Jordan <daiderd@gmail.com>2019-03-22 20:48:58 +0100
commitb68f77b404af4b2200fd3229a4fd16ef09d0edf9 (patch)
tree377916e5ff334159012e647f15b397cc2e7ec436
parent13f2480374343369f7ad8e0147c5d182047e2484 (diff)
launchd: ensure user LaunchAgents exist
Apparently this doesn't exist by default, so make sure it's created first. Fixes #134
-rw-r--r--modules/system/launchd.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/system/launchd.nix b/modules/system/launchd.nix
index 1d57ce3..f2cee96 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