diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 47aa0f21b1ff..92daf75e36c4 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -85,31 +85,29 @@ References: Nix package manager for Linux and MacOS. === "Command line" - -`nix-env --install -A nixpkgs.trivy` + `nix-env --install -A nixpkgs.trivy` === "Configuration" - -```nix - # your other config ... - environment.systemPackages = with pkgs; [ - # your other packages ... - trivy - ]; -``` + ```nix + # your other config ... + environment.systemPackages = with pkgs; [ + # your other packages ... + trivy + ]; + ``` === "Home Manager" - -```nix - # your other config ... - home.packages = with pkgs; [ - # your other packages ... - trivy - ]; -``` + ```nix + # your other config ... + home.packages = with pkgs; [ + # your other packages ... + trivy + ]; + ``` References: -- + +- https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/admin/trivy/default.nix ### FreeBSD (Official) @@ -119,6 +117,48 @@ References: pkg install trivy ``` +### asdf/mise (Community) + +[asdf](https://github.com/asdf-vm/asdf) and [mise](https://github.com/jdx/mise) are quite similar tools you can use to install trivy. +See their respective documentation for more information of how to install them and use them: + +- [asdf](https://asdf-vm.com/guide/getting-started.html) +- [mise](https://mise.jdx.dev/getting-started.html) + +The plugin used by both tools is developped [here](https://github.com/zufardhiyaulhaq/asdf-trivy) + + +=== "asdf" + A basic global installation is shown below, for specific version or/and local version to a directory see "asdf" documentation. + + ```shell + # Install plugin + asdf plugin add trivy https://github.com/zufardhiyaulhaq/asdf-trivy.git + + # Install latest version + asdf install trivy latest + + # Set a version globally (on your ~/.tool-versions file) + asdf global trivy latest + + # Now trivy commands are available + trivy --version + ``` + +=== "mise" + A basic global installation is shown below, for specific version or/and local version to a directory see "mise" documentation. + + ``` shell + # Install plugin and install latest version + mise install trivy@latest + + # Set a version globally (on your ~/.tool-versions file) + mise use -g trivy@latest + + # Now trivy commands are available + trivy --version + ``` + ## Install from GitHub Release (Official) ### Download Binary