1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

checks: fail when db permissions are wrong

This commit is contained in:
Daiderd Jordan 2018-01-18 00:12:38 +01:00
parent c0f913d2ae
commit 9454e409b7
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -119,6 +119,17 @@ let
exit 2
fi
'';
nixStore = ''
if test -w /nix/var/nix/db -a ! -O /nix/store; then
echo >&2 "error: the store is not owned by this user, but /nix/var/nix/db is writable"
echo >&2 "If you are using the daemon:"
echo >&2
echo >&2 " sudo chown -R /nix/var/nix/db"
echo >&2
exit 2
fi
'';
in
{
@ -131,6 +142,7 @@ in
${darwinChanges}
${runLink}
${buildUsers}
${nixStore}
${nixChannels}
${nixInstaller}
${nixPath}