From dfaf072be7ddd32468591fb622e654b92afa1a17 Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:09:08 +0200 Subject: [PATCH] README.rst: add nix docs --- README.rst | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 8b8b74f78b4..04da541b7e4 100644 --- a/README.rst +++ b/README.rst @@ -117,7 +117,6 @@ Scoop scoop install gallery-dl - Homebrew -------- @@ -174,6 +173,62 @@ This will remove the container after every use so you will always have a fresh e You can also add an alias to your shell for "gallery-dl" or create a simple bash script and drop it somewhere in your $PATH to act as a shim for this command. +Nix and Home Manager +-------------------------- + +For Nix users, there are a many of ways of using *gallery-dl*: + +Adding *gallery-dl* to your system environment: + +.. code:: nix + + environment.systemPackages = with pkgs; [ + gallery-dl + ]; + +Using :code:`nix-shell` + +.. code:: bash + + nix-shell -p gallery-dl + +.. code:: bash + + nix-shell -p gallery-dl --run "gallery-dl " + +Using :code:`nix3-run` + +.. code:: bash + + nix run nixpkgs#gallery-dl -- + +Using :code:`nix profile` + +.. code:: bash + + nix profile install nixpkgs#gallery-dl + +For Home Manager users, you can manage *gallery-dl* declaratively: + +.. code:: nix + + programs.gallery-dl = { + enable = true; + settings = { + extractor.base-directory = "~/Downloads"; + }; + }; + +Alternatively, you can just add it to :code:`home.packages` if you don't want to manage it declaratively: + +.. code:: nix + + home.packages = with pkgs; [ + gallery-dl + ]; + +After making these changes, simply rebuild your configuration and open a new shell to have *gallery-dl* available. + Usage =====