nixos/system/home/shell/git.nix
Evie Litherland-Smith 9d401ace7f Re-enable git-sync service to sync org and library directories
git-sync service works now that I'm using libsecret for git auth.

Remove password-store from service, manage manually. Considering
switch to proton pass anyway.

Copy gpg and gpg-agent config to emacs/default.nix in case I switch
away from password-store.
2024-10-05 12:38:24 +01:00

57 lines
1.2 KiB
Nix

{
config,
lib,
pkgs,
...
}:
{
services.git-sync.enable = true;
programs.git =
let
package = pkgs.git.override {
withLibsecret = true;
withSsh = true;
};
in
{
inherit package;
enable = true;
userName = "Evie Litherland-Smith";
userEmail = lib.mkDefault "evie@xenia.me.uk";
delta = {
enable = true;
options = {
line-numbers = true;
hyprlinks = true;
navigate = true;
side-by-side = true;
syntax-theme = lib.mkIf config.programs.bat.enable config.programs.bat.config.theme;
};
};
attributes = [
"*.gpg filter=gpg diff=gpg"
"*.asc filter=gpg diff=gpg"
];
extraConfig =
let
user = "pixelifytica";
in
{
github = {
inherit user;
};
gitea = {
inherit user;
};
pull.rebase = false;
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
credential.helper = "${package}/bin/git-credential-libsecret";
diff = {
colorMoved = "default";
gpg.textconv = "gpg --no-tty --decrypt";
};
};
};
}