{"id":49220514,"url":"https://github.com/juspay/devbox","last_synced_at":"2026-04-24T03:01:57.887Z","repository":{"id":352944679,"uuid":"1217285550","full_name":"juspay/devbox","owner":"juspay","description":"WIP: NixOS based devbox on macOS","archived":false,"fork":false,"pushed_at":"2026-04-21T20:20:21.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T22:14:57.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juspay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T18:25:35.000Z","updated_at":"2026-04-21T20:20:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/juspay/devbox","commit_stats":null,"previous_names":["juspay/lima-nixos-demo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/juspay/devbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fdevbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fdevbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fdevbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fdevbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juspay","download_url":"https://codeload.github.com/juspay/devbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fdevbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32207191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T01:12:49.758Z","status":"online","status_checked_at":"2026-04-24T02:00:07.115Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-24T03:01:56.910Z","updated_at":"2026-04-24T03:01:57.875Z","avatar_url":"https://github.com/juspay.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devbox\n\nNixOS based devbox on macOS — a [`justfile`](justfile) + flake that boots and provisions a customized NixOS VM via [Lima](https://lima-vm.io/).\n\n## Requirements\n\n- [Nix](https://nixos.asia/en/install) (everything else comes from the devShell)\n- [`just`](https://github.com/casey/just)\n\nRun `nix develop` once to enter a shell with `lima`, `just`, and `gh` pinned, or let each recipe invoke `nix develop -c` automatically.\n\n## Usage\n\n```sh\njust              # list recipes\njust start        # create + boot the VM, then apply our flake (nixos-rebuild)\njust provision    # re-apply the flake (after editing config)\njust shell        # open a shell in the VM\njust stop         # stop the VM\njust delete       # remove the VM\njust recreate     # wipe and start fresh\njust list         # list all Lima VMs\n```\n\nFirst `just start` takes a few minutes: it boots the stock `github:nixos-lima` image, then `nixos-rebuild switch` applies our [`flake.nix`](flake.nix) on top.\n\nThe VM user and hostname default to your macOS `$USER` / `devbox`. CPU / memory / disk default to `host cores − 2`, `host RAM − 4 GiB`, and `half of host free disk`. Memory is a ceiling (the vz driver demand-pages from the host); disk is a ceiling (Lima's qcow2 is sparse and grows lazily); CPU over-subscription is cheap. Override any default with `just --set`, e.g. `just --set cpus 4 --set memory 16 --set disk 200 start`.\n\n## What's in the VM\n\nVia [`nixos/devbox.nix`](nixos/devbox.nix): `nix-ld`, flakes, [`nixos-vscode-server`](https://github.com/nix-community/nixos-vscode-server), `starship`, `direnv` + `nix-direnv`, `btop`, `just`, `gh`.\n\n## Release images\n\nThe flake can build baked Lima-compatible qcow2 images from `nixosConfigurations.devbox-aarch64.config.system.build.images.qemu-efi` and `nixosConfigurations.devbox-x86_64.config.system.build.images.qemu-efi`. Publishing a GitHub release triggers the release-image workflow, which uses the `ci` dev shell to upload `devbox-\u003ctag\u003e-aarch64.qcow2`, `devbox-\u003ctag\u003e-x86_64.qcow2`, and matching SHA-512 files to that release.\n\nThese assets are groundwork for launching directly from a devbox image. For now, `just start` still boots the stock `nixos-lima` image and runs `nixos-rebuild switch`.\n\n## Cutting a release\n\nAfter merging release-image changes, create a GitHub release:\n\n```sh\njust release v0.1.0\n```\n\nPublishing the release starts the `Release Images` workflow. The workflow builds and compresses the x86_64 image on the self-hosted `x86_64-linux` runner and the aarch64 image on GitHub's `ubuntu-24.04-arm` runner, then uploads the qcow2 and SHA-512 assets to the release.\n\nTo rerun uploads for an existing release after this workflow is on `main`:\n\n```sh\njust release-images v0.1.0\n```\n\n## Security model\n\nThis is a local, single-user devbox VM, not a hardened multi-user host. The passwordless sudo behavior comes from `nixos-lima`: `lima-init` creates a guest user matching your macOS `$USER` and adds it to `wheel`, while the `nixos-lima` module sets `security.sudo.wheelNeedsPassword = false`. This repo currently keeps that behavior so `just provision` can run `nixos-rebuild switch`.\n\nSSH access uses Lima's generated config under `~/.lima/devbox/ssh.config`, so this repo does not mutate your global `~/.ssh/config`. Your macOS home is mounted into the guest at `/Users/\u003cyou\u003e` read-only; keep day-to-day development work in the guest's own writable filesystem, such as `~/code`.\n\n## Installing more tools\n\nFor ad hoc user-level tools inside the VM, use `nix profile install`, e.g. `nix profile install nixpkgs#ripgrep`.\n\nFor declarative user packages, dotfile management, and systemd user services, use Home Manager from the [`juspay/nixos-unified-template`](https://github.com/juspay/nixos-unified-template).\n\n## SSH access\n\n```sh\njust ssh                # SSH into the VM (uses Lima's generated config, no global mutation)\njust ssh uname -a       # run a command over SSH\njust ssh-config         # print Lima's generated SSH config\n```\n\n## VSCode Remote-SSH\n\nPoint VSCode at Lima's generated SSH config — no `~/.ssh/config` mutation, no tunnel service:\n\n1. `Cmd-Shift-P` → **Remote-SSH: Settings** → set **Config File** to `~/.lima/devbox/ssh.config`.\n2. `Cmd-Shift-P` → **Remote-SSH: Connect to Host…** → pick `lima-devbox`.\n\nThat's the whole setup. Subsequent connects are one command.\n\n## Working on projects inside the VM\n\nLima mounts your macOS home at `/Users/\u003cyou\u003e` inside the guest **read-only**. For development, clone repos into the guest's own filesystem (writable, faster, no 9p overhead):\n\n```sh\njust ssh\nmkdir -p ~/code \u0026\u0026 cd ~/code\ngit clone …\n```\n\nThe mount's read-only state is the Lima default; we keep it. If you want to override it (or anything else in the template), [`flake.nix`](flake.nix) has a `yq`-based pattern commented next to the `lima-template` derivation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fdevbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuspay%2Fdevbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fdevbox/lists"}