-
Setup mac terminal. read more here
-
Clone the repository
git clone git@github.com:zyobum/shell.git ~/workspace/myshell -
Install 'lima' and required packages.
brew install lima jq
-
Start new instance with pre-definedlib example:docker
limactl start --name=default template://docker
-
Stop the docker instance
limactl factory-reset default
-
Modify mount points. Put following lines in the mount section of
~/.lima/default/lima.yaml-
Remove "~" home folder
-
Add following mount point
- location: "~/.ssh/myshell_keys" writable: true - location: "~/workspace" writable: true - location: "~/Downloads" writable: true
-
-
Append the following lines after the
mountsection:ssh: forwardAgent: true forwardX11Trusted: true
-
Append new script in the
provisionsection:- mode: user script: | #!/bin/bash curl -sfL https://github.com/zyobum/shell/raw/main/myconfig.sh | bash -s - > /tmp/lima/myconfig.out 2>&1
-
Append the following line in the
messagesection:Restart the instance to finish the provisioning by 'limactl stop default && limactl start default' Install Quartz for X11 support. -
start instance
limactl start default
-
Check instance status
limactl list
-
Check the progress of provision
tail -f /tmp/myshell_service.err
-
Check the progress of myconfig.sh
tail -f /tmp/lima/myconfig.out
-
If lima instance status became 'borken'
limactl stop -f default
-
Install fonts for Terminal. Follow the instruction here: https://github.com/romkatv/powerlevel10k#manual-font-installation
-
Test myshell
limactl start default lima
-
Run the Shell - In the preference page of the terminal, choose the desired profile - In the 'Startup' section of the 'Shell' tab, check 'Run command' and set the following command:
/bin/bash -c "$HOME/workspace/myshell/myshell.sh" -
Install login autostart. copy 'Startup.sh' to home directory and assign it as a login item in the setting pane. https://stackoverflow.com/questions/6442364/running-script-upon-login-in-mac-os-x
- Note: Do not use
sudo rebootin the box, the mount points will lost. Uselimactl stopandlimactl startinstead. - known issue:
shutdownorpoweroffcause the vm to 'Borken' state.