fix: fix gpg issues

This commit is contained in:
Felix Schröter 2021-10-29 20:38:31 +02:00
parent 61dd2dc67f
commit e3a8c9d2fe
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58
2 changed files with 14 additions and 6 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
with pkgs; { with pkgs; {
imports = [ imports = [
@ -19,7 +19,7 @@ with pkgs; {
longitude = "10.4014691"; longitude = "10.4014691";
}; };
programs.ssh = { enable = true; }; programs.gpg.enable = true;
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
@ -29,8 +29,12 @@ with pkgs; {
defaultCacheTtlSsh = 600; defaultCacheTtlSsh = 600;
pinentryFlavor = "gnome3"; pinentryFlavor = "gnome3";
}; };
# https://github.com/nix-community/home-manager/issues/667#issuecomment-902236379
# https://github.com/nix-community/home-manager/pull/2253
home.sessionVariables.SSH_AUTH_SOCK =
"$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
programs.gpg.enable = true; programs.ssh.enable = true;
programs.git = { defaultProfile = "work"; }; programs.git = { defaultProfile = "work"; };

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
@ -29,7 +29,7 @@
}; };
}; };
programs.ssh = { enable = true; }; programs.gpg.enable = true;
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
@ -39,8 +39,12 @@
defaultCacheTtlSsh = 600; defaultCacheTtlSsh = 600;
pinentryFlavor = "gnome3"; pinentryFlavor = "gnome3";
}; };
# https://github.com/nix-community/home-manager/issues/667#issuecomment-902236379
# https://github.com/nix-community/home-manager/pull/2253
home.sessionVariables.SSH_AUTH_SOCK =
"$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
programs.gpg.enable = true; programs.ssh.enable = true;
programs.git = { defaultProfile = "private"; }; programs.git = { defaultProfile = "private"; };