mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
44 lines
922 B
Nix
44 lines
922 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.luj.programs.git;
|
|
in
|
|
with lib;
|
|
{
|
|
options.luj.programs.git = {
|
|
enable = mkEnableOption "Enable git program";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.git = {
|
|
enable = true;
|
|
userName = "Julien Malka";
|
|
userEmail = "julien@malka.sh";
|
|
signing = {
|
|
signByDefault = true;
|
|
key = "6FC74C847011FD83";
|
|
};
|
|
delta.enable = true;
|
|
ignores = [ ".direnv" ];
|
|
extraConfig = {
|
|
init.defaultBranch = "main";
|
|
diff.colorMoved = "zebra";
|
|
pull.rebase = true;
|
|
fetch.prune = true;
|
|
rebase.autoStash = true;
|
|
push.autoSetupRemote = true;
|
|
};
|
|
};
|
|
|
|
home.extraActivationPath = [ pkgs.gnupg ];
|
|
home.activation = {
|
|
myActivationAction = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
gpg --import /run/agenix/git-gpg-private-key
|
|
'';
|
|
};
|
|
};
|
|
}
|