Add GPG-specific option

This commit is contained in:
Spotlight 2023-09-10 23:05:09 -05:00
parent 29a271d52f
commit 0e960995fb
Signed by: spotlight
GPG key ID: 874AA355B3209BDC
4 changed files with 40 additions and 26 deletions

28
home/gpg.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
{
# GPG
programs.gpg.enable = true;
home.file.".gnupg/gpg-agent.conf" = lib.mkIf pkgs.stdenv.isDarwin {
text = ''
pinentry-program "${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac"
'';
};
# password-store
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
settings = {
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store";
};
};
# Only specify signing if GPG is otherwise being pulled in;
# i.e. in a prompt configuration.
programs.git.signing = {
key = "6EF6CBB6420B81DA3CCACFEA874AA355B3209BDC";
signByDefault = true;
};
}