diff --git a/docs/integrations/delta.md b/docs/integrations/delta.md new file mode 100644 index 000000000..2625c748b --- /dev/null +++ b/docs/integrations/delta.md @@ -0,0 +1,9 @@ +To get started using [Delta, a syntax-highlighting pager for git, diff, and grep output](https://dandavison.github.io/delta/), flip a toggle: + +```nix title="devenv.nix" +{ pkgs, ... }: + +{ + delta.enable = true; +} +``` diff --git a/docs/integrations/difftastic.md b/docs/integrations/difftastic.md index e76f77c1e..ae1234045 100644 --- a/docs/integrations/difftastic.md +++ b/docs/integrations/difftastic.md @@ -1,4 +1,4 @@ -To get started using [Difftastic, a structural diff that understands syntax for over 30 langauges](https://difftastic.wilfred.me.uk/), flip a toggle: +To get started using [Difftastic, a structural diff that understands syntax for over 30 languages](https://difftastic.wilfred.me.uk/), flip a toggle: ```nix title="devenv.nix" diff --git a/src/modules/integrations/delta.nix b/src/modules/integrations/delta.nix new file mode 100644 index 000000000..41c288a71 --- /dev/null +++ b/src/modules/integrations/delta.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, config, ... }: + +{ + options.delta.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Integrate delta into git: https://dandavison.github.io/delta/."; + }; + + config = lib.mkIf config.delta.enable { + packages = [ pkgs.delta ]; + + env.GIT_PAGER = "delta"; + }; +}