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:
parent
c0f913d2ae
commit
9454e409b7
1 changed files with 12 additions and 0 deletions
|
@ -119,6 +119,17 @@ let
|
|||
exit 2
|
||||
fi
|
||||
'';
|
||||
|
||||
nixStore = ''
|
||||
if test -w /nix/var/nix/db -a ! -O /nix/store; then
|
||||
echo >&2 "[1;31merror: the store is not owned by this user, but /nix/var/nix/db is writable[0m"
|
||||
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}
|
||||
|
|
Loading…
Add table
Reference in a new issue