1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 18:57:08 +00:00

checks: add test for /run

This commit is contained in:
Daiderd Jordan 2018-01-13 22:50:48 +01:00
parent f6b9e43a84
commit 243651e398
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -19,6 +19,17 @@ let
fi
'';
runLink = ''
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
exit 2
fi
'';
buildUsers = optionalString config.services.nix-daemon.enable ''
buildUser=$(dscl . -read /Groups/nixbld GroupMembership 2>&1 | awk '/^GroupMembership: / {print $2}') || true
if [ -z $buildUser ]; then
@ -42,7 +53,7 @@ let
"")
;;
*)
echo "error: The ~/.nix-defexpr/channels symlink does not point your users channels" >&2
echo "error: The ~/.nix-defexpr/channels symlink does not point your users channels, aborting activation" >&2
echo "Running nix-channel will regenerate it" >&2
echo >&2
echo " rm ~/.nix-defexpr/channels" >&2
@ -118,6 +129,7 @@ in
system.activationScripts.checks.text = ''
${darwinChanges}
${runLink}
${buildUsers}
${nixChannels}
${nixInstaller}