summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2020-03-28 16:03:48 +0100
committerDaiderd Jordan <daiderd@gmail.com>2020-03-28 19:12:21 +0100
commit80a8a591a9383a1718448a11d885ec488e835e47 (patch)
tree8a86eb11d9abf70351c9a1fb41e0dc85befbb32a /modules/system
parent75fa7cd6bfac9007424d915ef6212b814b7a258c (diff)
installer: try creating /run using synthetic.conf
Since macOS 10.15 Catalina / can't be changed directly anymore. Fixes #166
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/checks.nix17
1 files changed, 14 insertions, 3 deletions
diff --git a/modules/system/checks.nix b/modules/system/checks.nix
index 8b43845..5972e27 100644
--- a/modules/system/checks.nix
+++ b/modules/system/checks.nix
@@ -25,9 +25,20 @@ let
if ! test -e /run; then
echo "error: Directory /run does not exist, aborting activation" >&2
echo "Create a symlink to /var/run with:" >&2
- echo >&2
- echo " sudo ln -s private/var/run /run" >&2
- echo >&2
+ if test -e /etc/synthetic.conf; then
+ echo >&2
+ echo "$ echo "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf" >&2
+ echo "$ /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -B" >&2
+ echo >&2
+ echo "The current contents of /etc/synthetic.conf is:" >&2
+ echo >&2
+ sed 's/^/ /' /etc/synthetic.conf >&2
+ echo >&2
+ else
+ echo >&2
+ echo "$ sudo ln -s private/var/run /run" >&2
+ echo >&2
+ fi
exit 2
fi
'';