{"id":31948438,"url":"https://github.com/srid/landrun-nix","last_synced_at":"2026-01-20T17:02:41.872Z","repository":{"id":318736642,"uuid":"1073968658","full_name":"srid/landrun-nix","owner":"srid","description":"Nix flake-parts module for landrun (wrap Nix paths in Landlock based sandbox)","archived":false,"fork":false,"pushed_at":"2025-11-10T19:35:45.000Z","size":59,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-10T21:19:54.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-10-10T23:09:16.000Z","updated_at":"2025-11-10T19:35:49.000Z","dependencies_parsed_at":"2025-10-14T12:04:04.395Z","dependency_job_id":"631f055f-78c6-4c0b-b74c-7242d65719d7","html_url":"https://github.com/srid/landrun-nix","commit_stats":null,"previous_names":["srid/landrun-nix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/srid/landrun-nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Flandrun-nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Flandrun-nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Flandrun-nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Flandrun-nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srid","download_url":"https://codeload.github.com/srid/landrun-nix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Flandrun-nix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-10-14T12:00:53.852Z","updated_at":"2026-01-20T17:02:41.858Z","avatar_url":"https://github.com/srid.png","language":"Nix","funding_links":[],"categories":["Nix"],"sub_categories":[],"readme":"[![GitHub Discussions](https://img.shields.io/github/discussions/srid/landrun-nix)](https://github.com/srid/landrun-nix/discussions)\n\n# landrun-nix\n\nA Nix flake-parts module for wrapping programs with [landrun](https://github.com/Zouuup/landrun) (Landlock) sandbox.\n\n## Usage\n\nIn your `flake.nix`:\n\n```nix\n{\n  inputs.landrun-nix.url = \"github:srid/landrun-nix\";\n\n  outputs = { flake-parts, landrun-nix, ... }:\n    flake-parts.lib.mkFlake { inherit inputs; } {\n      imports = [ landrun-nix.flakeModule ];\n\n      perSystem = { pkgs, ... }: {\n        landrunApps.my-app-sandboxed = {\n          program = \"${pkgs.my-app}/bin/my-app\";\n          features = {\n            tty = true;      # Terminal support\n            nix = true;      # Nix store access (default)\n            network = true;  # Network access\n            tmp = true;      # /tmp access (default)\n          };\n          # Raw arguments to pass to `landrun` CLI\n          cli = {\n            rw = [ \"$HOME/.config/my-app\" ];\n            rox = [ \"/etc/hosts\" ];\n          };\n        };\n      };\n    };\n}\n```\n\nRun with: `nix run .#my-app-sandboxed`\n\n## Reusable Modules\n\nlandrun-nix provides reusable modules for common applications via `landrunModules.*`. These can be imported into your app configurations:\n\n```nix\n{\n  inputs.landrun-nix.url = \"github:srid/landrun-nix\";\n\n  outputs = { flake-parts, landrun-nix, ... }:\n    flake-parts.lib.mkFlake { inherit inputs; } {\n      imports = [ landrun-nix.flakeModule ];\n\n      perSystem = { pkgs, ... }: {\n        landrunApps.my-app = {\n          imports = [\n            landrun-nix.landrunModules.gh  # Import GitHub CLI module\n          ];\n          program = \"${pkgs.my-app}/bin/my-app\";\n          features.network = true;\n        };\n      };\n    };\n}\n```\n\n### Available Modules\n\n| Module | Description |\n|--------|-------------|\n| `landrunModules.gh` | GitHub CLI (`gh`) configuration with D-Bus keyring support |\n| `landrunModules.git` | Git configuration with TTY support and repository access |\n| `landrunModules.haskell` | Haskell tooling with Cabal configuration and state directory access |\n| `landrunModules.markitdown` | Markitdown configuration with `/proc/cpuinfo` access |\n\n## Examples\n\n### Claude Code\n\nSandbox [Claude Code](https://claude.ai/code) with access to project directory, config files, and network.\n\nSee [examples/claude-sandboxed](./examples/claude-sandboxed/flake.nix) for a complete working example.\n\nTry it: \n\n```sh\nnix run github:srid/landrun-nix?dir=examples/claude-sandboxed\n```\n\n## Features\n\nHigh-level feature flags automatically configure common sandboxing patterns:\n\n| Feature | Default | Description |\n|---------|---------|-------------|\n| `features.tty` | `false` | TTY devices, terminfo, locale env vars |\n| `features.nix` | `true` | Nix store, system paths, PATH env var |\n| `features.network` | `false` | DNS resolution, SSL certificates, unrestricted network |\n| `features.tmp` | `true` | Read-write access to /tmp |\n| `features.dbus` | `false` | D-Bus session bus, keyring access for Secret Service API |\n\n## CLI Options\n\nFine-grained control via `cli.*`:\n\n| Option | Description |\n|--------|-------------|\n| `rox` | Read-only + execute paths |\n| `ro` | Read-only paths |\n| `rwx` | Read-write-execute paths |\n| `rw` | Read-write paths |\n| `env` | Environment variables to pass through |\n| `unrestrictedNetwork` | Allow all network access |\n| `addExec` | Auto-add executable to rox (default: true) |\n\n## Discussions\n\nhttps://github.com/srid/landrun-nix/discussions\n\n## License\n\nGPL-3.0\n\n## Similar projects\n\nFrom [the original announcement post](https://x.com/sridca/status/1976791931431927899):\n\n- [nixpak](https://github.com/nixpak/nixpak): a fancy declarative wrapper around bubblewrap.\n- [jail.nix](https://sr.ht/~alexdavid/jail.nix/): helper to make it easy and ergonomic to wrap your derivations in bubblewrap.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Flandrun-nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrid%2Flandrun-nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Flandrun-nix/lists"}