-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlima-ubuntu-dev.yaml
More file actions
109 lines (103 loc) · 2.75 KB
/
Copy pathlima-ubuntu-dev.yaml
File metadata and controls
109 lines (103 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# lima-ubuntu-dev.yaml
# Lima VM template — Ubuntu
# Ref: https://lima-vm.io/docs/config/
# Requires: Lima >= 2.1.0
minimumLimaVersion: "2.1.0"
base:
- template:default
cpus: 4
memory: "4GiB"
mounts:
- location: "~/Downloads"
writable: true
- location: "~/code"
writable: true
- location: "~/.dotfiles"
writable: true
provision:
- mode: data
path: /etc/profile.d/99-linuxbrew.sh
# nofile is increased due to https://github.com/Homebrew/brew/issues/9120
content: |
ulimit -n 65536
[ -e /home/linuxbrew/.linuxbrew/bin/brew ] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
command -v gcc >/dev/null 2>&1 && exit 0
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y build-essential
- mode: user
script: |
#!/bin/bash
set -eux -o pipefail
[ -e /home/linuxbrew ] && exit 0
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
apt update
apt install -y --no-install-recommends \
kitty-terminfo
- mode: user
script: |
#!/bin/bash
set -eux -o pipefail
echo >> /home/{{.User}}.guest/.bashrc
grep -q 'shellenv' /home/{{.User}}.guest/.bashrc || echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"' >> /home/{{.User}}.guest/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"
brew tap hashicorp/tap
brew trust hashicorp/tap
brew install -y \
bat \
direnv \
eza \
fd \
fish \
fisher \
fnm \
fzf \
gh \
git \
git-delta \
gnupg \
go \
lazygit \
luarocks \
ncdu \
neovim \
node \
ripgrep \
sops \
starship \
stow \
terraform \
tree-sitter \
tree-sitter-cli \
uv
bash -c 'cd /home/{{.User}}.guest/.dotfiles && stow -v \
bat \
fish \
git \
lazygit \
nvim \
starship \
tmux \
'
mkdir -p /home/{{.User}}.guest/.cache/nvim
nvim --headless "+Lazy! sync" +qa
nvim --headless "+TSUpdate" +qa
nvim --headless "+MasonToolsInstallSync" +qa
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
probes:
- script: |
#!/bin/bash
set -eux
test -f /home/linuxbrew/.linuxbrew/bin/nvim
hint: |
Provisioning incomplete. Check logs:
limactl shell ubuntu-dev sudo journalctl -u cloud-final
limactl shell ubuntu-dev sudo less /var/log/cloud-init-output.log