Skip to content

Add custom Lima templates for homeless-* variants#1513

Open
kachick wants to merge 8 commits into
mainfrom
lima-template-unmount-home
Open

Add custom Lima templates for homeless-* variants#1513
kachick wants to merge 8 commits into
mainfrom
lima-template-unmount-home

Conversation

@kachick

@kachick kachick commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Create a custom Lima template homeless-docker.yaml derived from the standard
docker template. This avoids mounting the host's ~ directory, which is
not overridable via default.yaml.

  • pkgs/local/lima-custom-templates: add a package to generate the template
  • home-manager/lima-host.nix: link the custom template to ~/.lima/_templates/
  • .github/workflows/lima-guest.yml: update CI to use the new template

Create a custom Lima template `homeless-docker.yaml` derived from the standard
`docker` template. This avoids mounting the host's `~` directory, which is
not overridable via `default.yaml`.

* pkgs/local/lima-custom-templates: add a package to generate custom templates
* home-manager/lima-host.nix: link the custom templates recursively to ~/.lima/_templates/
* .github/workflows/lima-guest.yml: update CI to use the new template
* README.md: update setup instructions

Assisted-by: Gemini CLI <gemini-cli@google.com>
@kachick kachick force-pushed the lima-template-unmount-home branch from d56ec40 to e24d5bd Compare March 21, 2026 10:30
Create a custom Lima template `homeless-docker.yaml` derived from the standard
`docker` template. This avoids mounting the host's `~` directory, which is
not overridable via `default.yaml`.

* pkgs/local/lima-custom-templates: add a package to generate custom templates
* home-manager/lima-host.nix: link the custom templates recursively to ~/.lima/_templates/
* .github/workflows/lima-guest.yml: update CI to build templates via Nix and rename the instance
* README.md: update setup instructions

Assisted-by: Gemini CLI <gemini-cli@google.com>
@kachick kachick force-pushed the lima-template-unmount-home branch from e24d5bd to bab436c Compare March 21, 2026 10:56
@kachick kachick changed the title Add custom Lima template for homeless-docker Add custom Lima template for homeless-* variants Mar 21, 2026
@kachick kachick changed the title Add custom Lima template for homeless-* variants Add custom Lima templates for homeless-* variants Mar 21, 2026
kachick added 5 commits March 22, 2026 10:54
* config/lima/_config/default.yaml: Clarify the intent of matching
  absolute paths to ensure 'limactl shell' can synchronize directories.
* pkgs/local/lima-custom-templates: Improve readability of CLI flags
  description in meta.longDescription.

Assisted-by: Gemini CLI <gemini-cli@google.com>
Lima's default.yaml has a special configuration intended for global
defaults rather than a standalone template, so generating a 'homeless'
version of it might not behave as expected.

Assisted-by: Gemini CLI <gemini-cli@google.com>
Use `limactl validate` in `installCheckPhase` to ensure all generated
homeless templates are valid YAML and follow Lima's schema.
This uses `writableTmpDirAsHomeHook` to provide a temporary HOME directory
for `limactl`.

Assisted-by: Gemini CLI <gemini-cli@google.com>
Automatically create a symlink from `~/repos` in the guest home to the
mounted host `repos` directory. This restores compatibility with tools
like `ghq` and `cdrepo` while still allowing `limactl shell` to
synchronize the working directory using absolute host paths.

Assisted-by: Gemini CLI <gemini-cli@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant