mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
I don't know if i like this
This commit is contained in:
parent
c6a9144ffe
commit
1b62d16ddc
63 changed files with 369 additions and 294 deletions
31
nixosConfigurations/gerg-desktop/git.nix
Normal file
31
nixosConfigurations/gerg-desktop/git.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, config }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user = {
|
||||
name = "Gerg-L";
|
||||
email = "GregLeyda@proton.me";
|
||||
};
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
advice.addIgnoredFile = false;
|
||||
core.hooksPath = ".githooks";
|
||||
gpg = {
|
||||
format = "ssh";
|
||||
ssh.defaultKeyCommand = pkgs.writeShellScript "git_key" ''
|
||||
if ssh-add -L | grep -vq '${config.local.keys.gerg_gerg-desktop}'; then
|
||||
ssh-add -t 1m ~/.ssh/id_ed25519
|
||||
fi
|
||||
echo 'key::${config.local.keys.gerg_gerg-desktop}'
|
||||
'';
|
||||
};
|
||||
push.gpgsign = "if-asked";
|
||||
commit.gpgsign = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue