diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-01-13 22:50:48 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-01-13 22:50:48 +0100 |
| commit | 243651e398771dfe1bdcb10fdfc36497896c05cb (patch) | |
| tree | 05cd7ed5ec7a9cbe3449c1ee85962785a8c55321 /modules/system | |
| parent | f6b9e43a84a442013201d3b197659fb7672a1b7f (diff) | |
checks: add test for /run
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/activation-checks.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/system/activation-checks.nix b/modules/system/activation-checks.nix index 0379e0b..ad20a31 100644 --- a/modules/system/activation-checks.nix +++ b/modules/system/activation-checks.nix @@ -19,6 +19,17 @@ let fi ''; + runLink = '' + if ! test -e /run; then + echo "[1;31merror: Directory /run does not exist, aborting activation[0m" >&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 "[1;31merror: The ~/.nix-defexpr/channels symlink does not point your users channels[0m" >&2 + echo "[1;31merror: The ~/.nix-defexpr/channels symlink does not point your users channels, aborting activation[0m" >&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} |
