diff --git a/README.md b/README.md index 13af112..67858b5 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,34 @@ package. sudo port install ctpv ``` +### Nix + +#### Nix package + +```console +nix-env -ivf cptv +nix profile install nixpkgs#cptv # with flakes enabled +``` + +#### NixOS and HomeManager + +If you don't need to call it directly and +just want to use it through lf: + +```nix +programs.lf = { + previewer = { + keybinding = "i"; + source = "${pkgs.ctpv}/bin/ctpv"; + }; + extraConfig = '' + &${pkgs.ctpv}/bin/ctpv -s $id + cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id + set cleaner ${pkgs.ctpv}/bin/ctpvclear + ''; +} +``` + ## Integration ### lf file manager