Last active
July 20, 2024 15:20
-
-
Save sciabarracom/90c6890fbdc6b6c01e9f3dad59a738b3 to your computer and use it in GitHub Desktop.
Cloud Init for Docker Direnv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
# multipass launch -c4 -m8g -d20g -n cricket --cloud-init <url> | |
# multipass exec cricket -- sudo cloud-init status --wait | |
# cat ~/.ssh/id_rsa.pub | multipass exec cricket tee .ssh/authorized_keys | |
package_update: true | |
package_upgrade: true | |
users: | |
- name: ubuntu | |
uid: 1000 | |
groups: sudo | |
shell: /bin/bash | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
runcmd: | |
- curl -fsSL https://get.docker.com | bash | |
- usermod -Gdocker ubuntu | |
- curl -sfL https://direnv.net/install.sh | bash | |
- snap install task --classic | |
- git clone https://github.com/nix-community/nix-direnv /usr/local/nix-direnv | |
- | | |
curl -L https://nixos.org/nix/install | sudo -u ubuntu sh | |
cd /home/ubuntu | |
echo 'eval "$(direnv hook bash)"' >>.bashrc | |
mkdir -p .config/direnv | |
echo 'source /usr/local/nix-direnv/direnvrc' >>.config/direnv/direnverc | |
chown -Rvf ubuntu:ubuntu .config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
indirect launch from pc