add store as git credential helper

This commit is contained in:
ulic-youthlic 2025-01-11 19:39:45 +08:00
parent 71078e81a1
commit 81328d807f
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 16 additions and 3 deletions

View file

@ -1,4 +1,8 @@
{ config, lib, ... }:
{
config,
lib,
...
}:
{
options = {
youthlic.programs.git = {
@ -41,6 +45,9 @@
git_protocol = "ssh";
};
};
sops.secrets."gitea" = {
mode = "0440";
};
programs.git = lib.mkMerge [
{
enable = true;
@ -49,6 +56,11 @@
delta = {
enable = true;
};
extraConfig = {
credential = {
helper = "store --file=${config.sops.secrets."gitea".path}";
};
};
}
(lib.mkIf (cfg.signKey != null) {
signing = {