summaryrefslogtreecommitdiff
path: root/users/seth
diff options
context:
space:
mode:
authorseth <[email protected]>2023-07-25 02:55:49 -0400
committerseth <[email protected]>2023-07-25 02:55:49 -0400
commit05756be4a1fd88ea8de3a09706ed5f5c6bd5c6f8 (patch)
tree264509134804eb5838445f8642b98da3898016db /users/seth
parentb6eb0f026792f3707f6aac88ae2839923ceb2ad1 (diff)
users/seth: enable ssh+gpg for git
Diffstat (limited to 'users/seth')
-rw-r--r--users/seth/programs/git.nix47
1 files changed, 33 insertions, 14 deletions
diff --git a/users/seth/programs/git.nix b/users/seth/programs/git.nix
index bc19c8e..01b4277 100644
--- a/users/seth/programs/git.nix
+++ b/users/seth/programs/git.nix
@@ -1,25 +1,44 @@
{
- lib,
+ config,
pkgs,
+ osConfig,
...
}: {
- programs.git = {
- enable = true;
+ programs = {
+ gpg.enable = true;
- extraConfig = {
- init = {defaultBranch = "main";};
- };
+ git = {
+ enable = true;
+
+ extraConfig = {
+ init = {defaultBranch = "main";};
+ };
- signing = {
- key = "D31BD0D494BBEE86";
- signByDefault = true;
+ signing = {
+ key = "D31BD0D494BBEE86";
+ signByDefault = true;
+ };
+
+ userEmail = "[email protected]";
+ userName = "seth";
};
- userEmail = "[email protected]";
- userName = "seth";
+ ssh = {
+ enable = true;
+ package = pkgs.openssh;
+ };
};
- services.gpg-agent.extraConfig = lib.optionalString pkgs.stdenv.isLinux ''
- pinentry-program /run/current-system/sw/bin/pinentry
- '';
+ services.gpg-agent = {
+ enable = true;
+
+ enableBashIntegration = config.programs.bash.enable;
+ enableFishIntegration = config.programs.fish.enable;
+ enableZshIntegration = config.programs.zsh.enable;
+
+ pinentryFlavor =
+ if osConfig ? programs
+ then osConfig.programs.gnupg.agent.pinentryFlavor or "curses"
+ else "curses";
+ };
}