Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created March 21, 2018 12:45
Show Gist options
  • Save grahamc/7bfd912d58a8f6a16b4ffc45eb391d97 to your computer and use it in GitHub Desktop.
Save grahamc/7bfd912d58a8f6a16b4ffc45eb391d97 to your computer and use it in GitHub Desktop.
system.activationScripts.postActivation.text = ''
printf "disabling spotlight indexing... "
mdutil -i off -d / &> /dev/null
mdutil -E / &> /dev/null
echo "ok"
printf "configuring ssh keys for hydra on the root account... "
mkdir -p ~root/.ssh
cp -f /etc/per-user/root/ssh/authorized_keys ~root/.ssh/authorized_keys
chown root:wheel ~root ~root/.ssh ~root/.ssh/authorized_keys
echo "ok"
if [ ! -L /run ]; then
sudo ln -s /private/var/run /run
fi
printf "moving the oldbashrc and nixconf out of the way ..."
if [ ! -f /etc/bashrc.old ]; then
mv /etc/bashrc /etc/bashrc.old
fi
if [ ! -f /etc/nix/nix.conf.old ]; then
mv /etc/nix/nix.conf /etc/nix/nix.conf.old
fi
echo "ok"
'';
@grahamc
Copy link
Author

grahamc commented Mar 21, 2018

This will override options like nix.nixPath because it runs later,
remove this snippet from /etc/profile:

    # Nix
    if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
      . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
    fi
    # End Nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment