summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorsils <sils@sils.li>2024-01-15 16:13:54 +0100
committersils <sils@sils.li>2024-01-15 16:13:54 +0100
commit1114cf2cb45ec3f8595c9d34c982819bd45afff3 (patch)
tree74deff88179342bc612bcccb9dd058a7beba4e62
parentsys/services/restic: trigger first backup 30min after system awakens (diff)
downloadnix-config-1114cf2cb45ec3f8595c9d34c982819bd45afff3.tar.gz
nix-config-1114cf2cb45ec3f8595c9d34c982819bd45afff3.zip
move gpg home-dir to ~/.gnupg
GPG (especially gpg-agent) has way too much issues with a data-dir i
non-default locations.
-rw-r--r--sys/environment/default.nix4
-rw-r--r--users/sils/gpg/default.nix4
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/environment/default.nix b/sys/environment/default.nix
index bf8ec5f..d21a820 100644
--- a/sys/environment/default.nix
+++ b/sys/environment/default.nix
@@ -1,4 +1,4 @@
-{...}: {
+{lib, ...}: {
   environment = {
     sessionVariables = {
       XDG_CACHE_HOME = "\${HOME}/.cache";
@@ -12,7 +12,7 @@
       ANSIBLE_HOME = "\${HOME}/.local/share/ansible";
       #_JAVA_OPTIONS	= '-Djava.util.prefs.userRoot="\${XDG_CONFIG_HOME}/java"';
       WINEPREFIX = "\${HOME}/.local/share/wine";
-      GNUPGHOME = "\${HOME}/.local/share/gnupg";
+      GNUPGHOME = lib.mkForce "";
       GRADLE_USER_HOME = "\${HOME}/.local/share/gradle";
       GTK2_RC_FILES = "\${HOME}/.config/gtk-2.0/gtkrc";
       EDITOR = "nvim";
diff --git a/users/sils/gpg/default.nix b/users/sils/gpg/default.nix
index 79c4b33..af3dcea 100644
--- a/users/sils/gpg/default.nix
+++ b/users/sils/gpg/default.nix
@@ -5,7 +5,6 @@
 }: {
   programs.gpg = {
     enable = true;
-    homedir = "${config.xdg.dataHome}/gnupg";
   };
   services.gpg-agent = {
     enable = true;
@@ -21,4 +20,7 @@
     SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
     gpg-connect-agent /bye
   '';
+  home.sessionVariables = {
+    GNUPGHOME = lib.mkForce "";
+  };
 }