Add git diff support for sops files

This commit is contained in:
Manuel Thalmann 2024-05-03 15:13:43 +02:00
parent c7d06a8cf3
commit 60c8a7d4dc
3 changed files with 15 additions and 1 deletions

6
.gitattributes vendored Normal file
View file

@ -0,0 +1,6 @@
secrets/**/*.env diff=sopsdiffer
secrets/**/*.env.* diff=sopsdiffer
secrets/**/*.ini diff=sopsdiffer
secrets/**/*.json diff=sopsdiffer
secrets/**/*.yaml diff=sopsdiffer
secrets/**/*.yml diff=sopsdiffer

2
.gitconfig Normal file
View file

@ -0,0 +1,2 @@
[diff "sopsdiffer"]
textconv = "sops --decrypt"

View file

@ -1,3 +1,9 @@
# NixOSConfig
NixOS Configurations for personal Machines
NixOS Configurations for personal Machines
Run the following command for adding `git diff` support for `sops` in this repository:
```sh
git config --local include.path ../.gitconfig
```