summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/default.nix1
-rw-r--r--users/seth/programs/git.nix47
2 files changed, 34 insertions, 14 deletions
diff --git a/users/default.nix b/users/default.nix
index 83d8ce5..3ac811e 100644
--- a/users/default.nix
+++ b/users/default.nix
@@ -12,6 +12,7 @@
inherit system;
overlays = with inputs; [nur.overlay getchoo.overlays.default];
};
+ modules = [{_module.args.osConfig = {};}];
};
};
};
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";
+ };
}