Skip to main content

Stateless client/server remote development environments powered by Nix and Podman.

Project description

mnix

mnix is a lightweight Python implementation of a remote development workflow built around Nix flakes, SSH, and Podman.

The repository includes a root flake.nix, so mnix new can use the default ./flake.nix and nix develop works directly from the project root.

Commands

Client

mnix ls
mnix select [project-name]
mnix new [-f path/to/flake.nix] [--server server-name] project-name
mnix rebuild-switch [path/to/flake.nix] [--project project-name]
mnix shell [--project project-name]
mnix exec [--project project-name] -- command [args...]
mnix server ls
mnix server add ssh://user@example.com server-name
mnix server rm server-name

Server

The client talks to the server by invoking mnix-server over SSH. The server CLI is structured so it can later be reused behind Flask or FastAPI.

mnix-server project launch --name project-name --flake flake.nix
mnix-server project rebuild-switch --name project-name --flake flake.nix
mnix-server project shell --name project-name --flake flake.nix
mnix-server project exec --name project-name --flake flake.nix -- command [args...]

Configuration

Both client and server use TOML configuration.

Client config

Default path: ~/.config/mnix/client.toml

ssh_binary = "ssh"
remote_binary = "mnix-server"
remote_podman_binary = "podman"
default_server = "my-server"
database_path = "~/.local/state/mnix/client.db"

Server config

Default path: ~/.config/mnix/server.toml

podman_binary = "podman"
base_image = "docker.io/nixos/nix:latest"
workspace_root = "/tmp/mnix/workspaces"
warmup_command = "nix --extra-experimental-features 'nix-command flakes' develop -c true"
container_command = "sleep infinity"

Architecture

  • src/mnix/client: thin CLI, local SQLite state, SSH transport, workspace archiving.
  • src/mnix/server/domain: domain entities and value objects.
  • src/mnix/server/application: use cases for project launch and rebuild.
  • src/mnix/server/infrastructure: Podman runner, config loading, workspace extraction.
  • src/mnix/server/interfaces: server CLI adapter.

The current implementation is intentionally stateless on the server side: it stages a workspace, ensures a Podman container exists for the project, and returns command results directly to the client.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnix-0.2.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mnix-0.2.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file mnix-0.2.0.tar.gz.

File metadata

  • Download URL: mnix-0.2.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mnix-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d7edc08bf23112ffc35ad0cf56a70069491fcf8ebba55cf0ea103262b11f6eab
MD5 9fa08f053f5e0b8bd08cdf77d67df4bf
BLAKE2b-256 c559107b967a864f1a685ad0fbf6a49090e9af03979e204fc4add78316a2f765

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnix-0.2.0.tar.gz:

Publisher: python-publish.yml on AvikantSrivastava/mecha-nix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnix-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mnix-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mnix-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ece8ef24cbd9c9b053247a378cc1ac539da2767725de3489296bb3e1f7a8121
MD5 bfca7c882da244eabc6a8f21e6edc912
BLAKE2b-256 9147a924f7bc124df19f3c1cef7e49b4056d996efbd522e3a164bd854705d8f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnix-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on AvikantSrivastava/mecha-nix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page