diff options
Diffstat (limited to 'modules/shell')
-rw-r--r-- | modules/shell/git/config.in | 2 | ||||
-rw-r--r-- | modules/shell/git/default.nix | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/modules/shell/git/config.in b/modules/shell/git/config.in index 3988a18d86d5..7c039ae0a45e 100644 --- a/modules/shell/git/config.in +++ b/modules/shell/git/config.in @@ -52,3 +52,5 @@ tool = opendiff [push] default = current +[sendemail] + smtpServer = @smtpServer@ diff --git a/modules/shell/git/default.nix b/modules/shell/git/default.nix index 2e872ecaa85f..2f61a984aff3 100644 --- a/modules/shell/git/default.nix +++ b/modules/shell/git/default.nix @@ -9,9 +9,17 @@ let chmod +x $out ''; + # Git only supports absolute paths for this, so give it a wrapper + # program that execs the msmtp in PATH. + sendmail = pkgs.writeScript "git-sendmail" '' + #! ${pkgs.execline}/bin/execlineb -S0 + msmtp $@ + ''; + config = pkgs.runCommand "gitconfig" { inherit mozlz4_textconv; python = pkgs.python3; + smtpServer = sendmail; attributesfile = ./attributes; ignorefile = ./ignore; preferLocalBuild = true; @@ -21,8 +29,10 @@ let in { - environment.systemPackages = with pkgs; with gitAndTools; - [ gitSVN git-remote-hg ]; + environment.systemPackages = with pkgs; with gitAndTools; [ + (git.override { svnSupport = true; sendEmailSupport = true; }) + git-remote-hg + ]; xdg.config.users.qyliss.paths."git/config" = config; } |