xrsh
Interactive text/OS terminal inside WebXR
Declared in: projects/xrsh/default.nix
Try the program in a shell
- 
    Install Nix
    
- Bash
 - 
  
$ apt install --yes curl git jq nix 
- Bash
 - 
  
$ apt install --yes curl git jq nix 
- Bash
 - 
  
$ pacman --sync --refresh --noconfirm 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
    
- Bash
 - 
  
$ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/ trusted-public-keys = cache.nixos.org-1:6nchdd59x431o0gwypbmraurkbj16zpmqfgspcdshjy= ngi.cachix.org-1:n+cal72roc3qqulxihpv+tw5t42whxmmhpragkrsrow=' 
 - 
    Build and run the shell
    
- Bash
 - 
  
$ nix-build ./default.nix && ./result 
- Bash
 - 
  
$ nix-build ./default.nix && ./result 
- Bash
 - 
  
$ 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" 
- Bash
 - 
  
$ nix-build ./default.nix && ./result 
 - 
  Usage Instructions
  
- 
Run
xrshin the demo shell. - 
Visit http://127.0.0.1:8090 on the browser to access the WebXR terminal.
 - 
To change the web service port, set the environment variable
XRSH_PORTbefore running the demo shell. 
 - 
 
Options
programs.xrsh
- 
  
  
Whether to enable enable xrsh.
- Type:
 boolean- Default:
 false- Declared in:
 - projects/xrsh/programs/xrsh/module.nix
 
 - 
  
  
The xrsh package to use.
- Type:
 package- Default:
 pkgs.xrsh- Declared in:
 - projects/xrsh/programs/xrsh/module.nix
 
 - 
  
  
Port to serve xrsh on
- Type:
 null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)- Default:
 8080- Declared in:
 - projects/xrsh/programs/xrsh/module.nix
 
 
programs.xrsh.enable
programs.xrsh.package
programs.xrsh.port
Examples
Enable xrsh and set a port to serve on
{ ... }: { programs.xrsh.enable = true; programs.xrsh.port = 8090; }
Declared in: projects/xrsh/programs/xrsh/examples/basic.nix
This project is funded by NLnet through these subgrants:
- Entrust
 - xrsh
 
Related links: