docs: add Nix guide

This commit is contained in:
sxyazi 2023-07-30 15:20:02 +08:00
parent da16f1db5a
commit f7022266aa
No known key found for this signature in database
2 changed files with 28 additions and 13 deletions

View file

@ -42,6 +42,23 @@ And download the latest release [from here](https://github.com/sxyazi/yazi/relea
cargo install --git https://github.com/sxyazi/yazi.git cargo install --git https://github.com/sxyazi/yazi.git
``` ```
### Nix
Nix users can install Yazi from [the NUR](https://github.com/nix-community/nur-combined/blob/master/repos/xyenon/pkgs/yazi/default.nix):
```bash
nix-env -iA nur.repos.xyenon.yazi
```
Or add the following to your configuration:
```nix
# configuration.nix
environment.systemPackages = with pkgs; [
nur.repos.xyenon.yazi
];
```
### Build from source ### Build from source
Execute the following commands to clone the project and build Yazi: Execute the following commands to clone the project and build Yazi:
@ -69,7 +86,7 @@ If you want to use your own config, copy the [config folder](https://github.com/
## Image Preview ## Image Preview
| Platform | Protocol | Support | | Platform | Protocol | Support |
| ----------- | -------------------------------------------------------------------------------- | --------------------- | | ------------- | -------------------------------------------------------------------------------- | --------------------- |
| Kitty | [Terminal graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) | ✅ Built-in | | Kitty | [Terminal graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) | ✅ Built-in |
| WezTerm | [Terminal graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) | ✅ Built-in | | WezTerm | [Terminal graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) | ✅ Built-in |
| Konsole | [Terminal graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) | ✅ Built-in | | Konsole | [Terminal graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) | ✅ Built-in |

View file

@ -1,5 +1,3 @@
use core::adaptor;
use ui::App; use ui::App;
mod config; mod config;
@ -13,7 +11,7 @@ async fn main() -> anyhow::Result<()> {
config::init(); config::init();
adaptor::Adaptor::init(); core::adaptor::Adaptor::init();
App::run().await App::run().await
} }