-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlima-devshell-template.yaml
More file actions
68 lines (58 loc) · 2.02 KB
/
Copy pathlima-devshell-template.yaml
File metadata and controls
68 lines (58 loc) · 2.02 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
# Lima template for lima-devshell
# This template provides a base configuration for Nix devshell development environments
#
# Usage:
# limactl create --name=my-instance lima-devshell-template.yaml
# limactl start my-instance
#
# Or use with lima-devshell tool which will customize mounts dynamically
# VM type: "vz" for macOS 13.5+, "qemu" for others
vmType: vz
# Architecture: "aarch64" for Apple Silicon, "x86_64" for Intel
arch: aarch64
# Ubuntu 24.04 LTS cloud image
images:
- location: https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img
arch: aarch64
# Resource allocation
cpus: 4
memory: 6GiB
disk: 80GiB
# Mounts will be added dynamically by lima-devshell based on worktree paths
# Example mounts (customized per instance):
# mounts:
# - location: /path/to/worktree
# mountPoint: /worktrees/path/to/worktree
# writable: true
# - location: /path/to/bare/repo
# mountPoint: /git/bare/repo
# writable: true
mounts: []
# SSH configuration
# Enables SSH access for tools like VS Code Remote Development
# See: https://lima-vm.io/docs/usage/ssh/
ssh:
localPort: 0 # Auto-assign port (use limactl list to find the port)
loadDotSSHPubKeys: true # Load ~/.ssh/*.pub keys automatically
forwardAgent: true # Forward SSH agent for git operations
# Environment variables
env:
LIMA_WORKDIR_DISABLED: "1" # Disable Lima's default workdir mount
# Provision script: Create dev user for development
provision:
- mode: system
script: |
#!/bin/sh
# Create dev user if not present
if ! id dev >/dev/null 2>&1; then
useradd -m -s /bin/bash dev
passwd -d dev # No password required
usermod -aG sudo dev
fi
# Guest agent for better integration
# Required for MCP (Model Context Protocol) tools support
# MCP tools allow AI agents outside Lima to securely read, write, and execute files
# within the VM sandbox. See: https://lima-vm.io/docs/config/ai/outside/mcp/
guestAgent:
enabled: true
logPath: /var/log/lima-guest-agent.log