Yazi: Difference between revisions
→Troubleshooting: RAR file support needs _7zz-rar as a dependency |
m remove duplicate schema in URL |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
== Installation == | == Installation == | ||
=== | There are several ways to install Yazi on NixOS. | ||
<syntaxhighlight lang="bash | |||
=== Temporary Shell === | |||
To temporarily use Yazi in your current shell session, run: | |||
<syntaxhighlight lang="bash"> | |||
nix-shell -p yazi | nix-shell -p yazi | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === System-wide === | ||
<syntaxhighlight lang="nix">programs.yazi | To install Yazi for all users on the system, add it to your {{ic|configuration.nix}}: | ||
<syntaxhighlight lang="nix"> | |||
programs.yazi.enable = true; | |||
</syntaxhighlight> | |||
After adding the option, rebuild your system: | |||
<syntaxhighlight lang="bash"> | |||
sudo nixos-rebuild switch | |||
</syntaxhighlight> | |||
=== Home Manager === | |||
To install Yazi for a single user, add it to your Home Manager configuration: | |||
<syntaxhighlight lang="nix"> | |||
programs.yazi.enable = true; | |||
</syntaxhighlight> | |||
After adding the option, apply the changes: | |||
<syntaxhighlight lang="bash"> | |||
home-manager switch | home-manager switch | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 29: | Line 38: | ||
As mentioned above, there are both [https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=programs.yazi NixOS options] and [https://nix-community.github.io/home-manager/options.xhtml#opt-programs.yazi.enable home-manager options] for configuring Yazi. | As mentioned above, there are both [https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=programs.yazi NixOS options] and [https://nix-community.github.io/home-manager/options.xhtml#opt-programs.yazi.enable home-manager options] for configuring Yazi. | ||
==== Advanced | ==== Advanced ==== | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
programs.yazi = { | programs.yazi = { | ||
Line 76: | Line 85: | ||
== Tips and Tricks == | == Tips and Tricks == | ||
==== Installing Plugins ==== | ==== Installing Plugins ==== | ||
Line 94: | Line 98: | ||
</syntaxhighlight>Afterwards, you can use the new package.<syntaxhighlight lang="nix"> | </syntaxhighlight>Afterwards, you can use the new package.<syntaxhighlight lang="nix"> | ||
# Global | # Global | ||
environment.systemPackages = [ yazi.packages.${pkgs.system}.default ]; | environment.systemPackages = [ yazi.packages.${pkgs.stdenv.hostPlatform.system}.default ]; | ||
# or, if you use the module | # or, if you use the module | ||
programs.yazi.package = yazi.packages.${pkgs.system}.default; | programs.yazi.package = yazi.packages.${pkgs.stdenv.hostPlatform.system}.default; | ||
# Home Manager | # Home Manager | ||
home.packages = [ yazi.packages.${pkgs.system}.default ]; | home.packages = [ yazi.packages.${pkgs.stdenv.hostPlatform.system}.default ]; | ||
# or, if you use the module | # or, if you use the module | ||
programs.yazi.package = yazi.packages.${pkgs.system}.default; | programs.yazi.package = yazi.packages.${pkgs.stdenv.hostPlatform.system}.default; | ||
</syntaxhighlight>Pre-built artifacts are served at https://yazi.cachix.org, so that Nix users don't have to build Yazi on their machine.<ref>https://yazi-rs.github.io/docs/installation/#cache</ref><syntaxhighlight lang="nix"> | </syntaxhighlight>Pre-built artifacts are served at https://yazi.cachix.org, so that Nix users don't have to build Yazi on their machine.<ref>https://yazi-rs.github.io/docs/installation/#cache</ref><syntaxhighlight lang="nix"> | ||
nix = { | nix = { | ||
Line 158: | Line 162: | ||
pkgs.yazi.override {_7zz = pkgs._7zz-rar; } | pkgs.yazi.override {_7zz = pkgs._7zz-rar; } | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== See also == | |||
*[https://search.nixos.org/options?channel=unstable&query=programs.yazi NixOS options for Yazi] | |||
*[https://yazi-rs.github.io/docs/installation/ Yazi official documentation] | |||
== References == | == References == | ||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:File Manager]] | [[Category:File Manager]] |