Files
vms/distros/nixos/23.05/http/in-chroot.sh
T
2023-08-13 23:58:13 -05:00

16 lines
449 B
Bash

#!/usr/bin/env bash
set -ex
# Set passwords
echo "vagrant:vagrant" | chpasswd
echo "root:vagrant" | chpasswd
# Configure vagrant user's SSH key
mkdir -m 0700 -p ~vagrant/.ssh
curl -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub
chmod 600 ~vagrant/.ssh/authorized_keys
# Set ownership of things vagrant should own
chown -R vagrant:wheel ~vagrant/
chown -R vagrant:wheel /etc/nixos