summaryrefslogtreecommitdiff
path: root/modules/launchd
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2016-11-06 23:53:08 +0100
committerDaiderd Jordan <daiderd@gmail.com>2016-11-06 23:53:08 +0100
commit43495a4961bfbd5f14993571f4cf34ce1f513931 (patch)
tree0fb86decf07343057b8483e8baf019d5043d0195 /modules/launchd
parentc137718ff7ead30c2424a87dc9d47c2193f4b83b (diff)
added activation script for launchd.daemon.nix-daemon
Diffstat (limited to 'modules/launchd')
-rw-r--r--modules/launchd/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/launchd/default.nix b/modules/launchd/default.nix
index a735c76..cb5e4d9 100644
--- a/modules/launchd/default.nix
+++ b/modules/launchd/default.nix
@@ -115,8 +115,11 @@ in {
system.activationScripts.launchd.text = ''
# Set up launchd services in /Library/LaunchAgents, /Library/LaunchDaemons and ~/Library/LaunchAgents
echo "setting up launchd services..."
- echo "TODO"
- exit 2
+
+ launchctl unload '/Library/LaunchDaemons/${cfg.daemons.nix-daemon.serviceConfig.Label}.plist'
+ ln -sfn '${cfg.daemons.nix-daemon.plist}' '/Library/LaunchDaemons/${cfg.daemons.nix-daemon.serviceConfig.Label}.plist'
+ launchctl load '/Library/LaunchDaemons/${cfg.daemons.nix-daemon.serviceConfig.Label}.plist'
+
'';
};