chore: Migrate git setting to newer nixpkgs module

This commit is contained in:
ulic-youthlic 2025-10-22 00:59:37 +08:00
parent 61c886245a
commit ab9d32bd6c
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 11 additions and 11 deletions

View file

@ -47,8 +47,11 @@
}; };
git = { git = {
enable = true; enable = true;
userEmail = cfg.email; settings.user = {
userName = cfg.name; inherit (cfg) email name;
};
lfs.enable = true;
};
delta = { delta = {
enable = true; enable = true;
options = { options = {
@ -57,8 +60,6 @@
side-by-side = true; side-by-side = true;
}; };
}; };
lfs.enable = true;
};
}; };
} }
(lib.mkIf (cfg.signKey != null) { (lib.mkIf (cfg.signKey != null) {
@ -69,7 +70,7 @@
}; };
}) })
(lib.mkIf cfg.encrypt-credential { (lib.mkIf cfg.encrypt-credential {
programs.git.extraConfig = { programs.git.settings = {
credential = { credential = {
helper = "store --file=${config.sops.secrets."git-credential".path}"; helper = "store --file=${config.sops.secrets."git-credential".path}";
}; };

View file

@ -38,7 +38,6 @@ in
config = lib.mkMerge [ config = lib.mkMerge [
(lib.mkIf cfg.enable { (lib.mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
delta
watchman watchman
]; ];
programs.jujutsu = { programs.jujutsu = {