about summary refs log tree commit diff
path: root/misc/launchd
diff options
context:
space:
mode:
Diffstat (limited to 'misc/launchd')
-rw-r--r--misc/launchd/local.mk5
-rw-r--r--misc/launchd/org.nixos.nix-daemon.plist.in16
2 files changed, 21 insertions, 0 deletions
diff --git a/misc/launchd/local.mk b/misc/launchd/local.mk
new file mode 100644
index 000000000000..0ba722efbf19
--- /dev/null
+++ b/misc/launchd/local.mk
@@ -0,0 +1,5 @@
+ifeq ($(OS), Darwin)
+
+  $(eval $(call install-data-in, $(d)/org.nixos.nix-daemon.plist, $(prefix)/Library/LaunchDaemons))
+
+endif
diff --git a/misc/launchd/org.nixos.nix-daemon.plist.in b/misc/launchd/org.nixos.nix-daemon.plist.in
new file mode 100644
index 000000000000..2e76947ea9e5
--- /dev/null
+++ b/misc/launchd/org.nixos.nix-daemon.plist.in
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+  <dict>
+    <key>Label</key>
+    <string>org.nixos.nix-daemon</string>
+    <key>RunAtLoad</key>
+    <true/>
+    <key>Program</key>
+    <string>@bindir@/nix-daemon</string>
+    <key>StandardErrorPath</key>
+    <string>/var/log/nix-daemin.log</string>
+    <key>StandardOutPath</key>
+    <string>/dev/null</string>
+  </dict>
+</plist>