xrsh
Interactive text/OS terminal inside WebXR
This project is funded by NLnet through these subgrants:
Try the program in a shell
-
Install Nix
-
- Arch Linux
$ pacman --sync --refresh --noconfirm curl git jq nix
-
- Debian
$ apt install --yes curl git jq nix
-
- Ubuntu
$ apt install --yes curl git jq nix
-
-
Download a configuration file
# default.nix { ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/main") { }, }: ngipkgs.demo-shell ( { ... }: { programs.xrsh.enable = true; programs.xrsh.port = 8090; } )
-
Enable binary substituters
$ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/'$'\n''trusted-public-keys = cache.nixos.org-1:6nchdd59x431o0gwypbmraurkbj16zpmqfgspcdshjy= ngi.cachix.org-1:n+cal72roc3qqulxihpv+tw5t42whxmmhpragkrsrow='
-
Build and run a virtual machine
- Arch Linux, Debian Sid and Ubuntu 25.04
nix-build ./default.nix && ./result
- Debian 12 and Ubuntu 24.04/24.10
rev=$(nix-instantiate --eval --attr sources.nixpkgs.rev https://github.com/ngi-nix/ngipkgs/archive/master.tar.gz | jq --raw-output)
nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$rev.tar.gz --packages nix --run "nix-build ./default.nix && ./result"
Options
programs.xrsh
- programs.xrsh.enable
-
Whether to enable enable xrsh.
- Type:
boolean
- Default:
false
- programs.xrsh.package
-
The xrsh package to use.
- Type:
package
- Default:
pkgs.xrsh
- programs.xrsh.port
-
Port to serve xrsh on
- Type:
null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
- Default:
8080
Examples
xrsh example
{ ... }: { programs.xrsh.enable = true; programs.xrsh.port = 8090; }