diff --git a/users/teidesu/common.nix b/users/teidesu/common.nix index 844543a..7ba9ee5 100644 --- a/users/teidesu/common.nix +++ b/users/teidesu/common.nix @@ -2,6 +2,7 @@ imports = [ inputs.nix-index-database.hmModules.nix-index ./zsh.nix + ./git.nix ]; home.stateVersion = "23.11"; diff --git a/users/teidesu/git.nix b/users/teidesu/git.nix new file mode 100644 index 0000000..41924c2 --- /dev/null +++ b/users/teidesu/git.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: + +let + isDarwin = pkgs.stdenv.isDarwin; +in { + programs.git = { + enable = true; + userName = "alina sireneva"; + userEmail = "alina@tei.su"; + signing = { + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHXaJrbD5SHp3HDtRX7YxrjO7wpcoY/L41Oc78IdT/l4"; + signByDefault = true; + }; + + extraConfig = { + gpg.format = "ssh"; + "gpg \"ssh\"" = if isDarwin then { + program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"; + } else { + defaultKeyCommand = "ssh-add -L"; + }; + push.autoSetupRemote = "true"; + }; + }; +} \ No newline at end of file