diff options
author | ProminentRetail <me@jakepark.me> | 2023-11-08 01:14:11 +1100 |
---|---|---|
committer | Maciej Krüger <mkg20001@gmail.com> | 2023-11-24 20:38:16 +0100 |
commit | 2db2f446c27b7be976822cf4d502857a0f522b2f (patch) | |
tree | 4099b8c48c433896441c92ff7eb0fc5a3b2a0082 /nixos/modules/programs | |
parent | b2063364e120e14ea5a120bd144ab75a1a3b83f5 (diff) |
nixos/git: add prompt.enable
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/git.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/programs/git.nix b/nixos/modules/programs/git.nix index 4e271a8c134b2..710dee349d590 100644 --- a/nixos/modules/programs/git.nix +++ b/nixos/modules/programs/git.nix @@ -58,6 +58,10 @@ in ''; }; + prompt = { + enable = mkEnableOption "automatically sourcing git-prompt.sh. This does not change $PS1; it simply provides relevant utility functions"; + }; + lfs = { enable = mkEnableOption (lib.mdDoc "git-lfs"); @@ -89,6 +93,11 @@ in }; }; }) + (mkIf (cfg.enable && cfg.prompt.enable) { + environment.interactiveShellInit = '' + source ${cfg.package}/share/bash-completion/completions/git-prompt.sh + ''; + }) ]; meta.maintainers = with maintainers; [ figsoda ]; |