Skip to content

Commit

Permalink
feat(git): show diffs for GPG-encrypted files
Browse files Browse the repository at this point in the history
  • Loading branch information
yurrriq committed Dec 12, 2023
1 parent 298eebc commit d449005
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.14.0
8.15.0
7 changes: 7 additions & 0 deletions config/git/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
};

diff = {
gpg = {
textconv = "gpg --no-tty --decrypt";
};
sopsdiffer = {
textconv = "sops -d";
};
Expand Down Expand Up @@ -116,6 +119,10 @@
(lib.attrValues config.accounts.email.accounts))).realName;
};

xdg.configFile."git/attributes".text = ''
*.gpg filter=gpg diff=gpg
'';

xdg.configFile."pass-git-helper/git-pass-mapping.ini" = {
source = ./git-pass-mapping.ini;
};
Expand Down
9 changes: 9 additions & 0 deletions src/config/git/config.nw
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Configure Git.

<<config/git/config.nix>>=
{ config, lib, pkgs, ... }:

Expand Down Expand Up @@ -48,6 +50,9 @@
};

diff = {
gpg = {
textconv = "gpg --no-tty --decrypt";
};
sopsdiffer = {
textconv = "sops -d";
};
Expand Down Expand Up @@ -117,6 +122,10 @@
(lib.attrValues config.accounts.email.accounts))).realName;
};

xdg.configFile."git/attributes".text = ''
*.gpg filter=gpg diff=gpg
'';

xdg.configFile."pass-git-helper/git-pass-mapping.ini" = {
source = ./git-pass-mapping.ini;
};
Expand Down

0 comments on commit d449005

Please sign in to comment.