about summary refs log tree commit diff
path: root/modules/gnupg.nix
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2025-03-12 20:17:13 +0300
committerazahi <azat@bahawi.net>2025-03-12 20:17:13 +0300
commitc81dc5a13b469c511fac6fa2390b70422d1b4da5 (patch)
tree4dab5909006ab5c25da6bd9fde6a714c7719ded7 /modules/gnupg.nix
parent2025-02-17 (diff)
2025-03-12 HEAD master
Diffstat (limited to 'modules/gnupg.nix')
-rw-r--r--modules/gnupg.nix80
1 files changed, 8 insertions, 72 deletions
diff --git a/modules/gnupg.nix b/modules/gnupg.nix
index 53e72a7..d1b1d8a 100644
--- a/modules/gnupg.nix
+++ b/modules/gnupg.nix
@@ -21,83 +21,19 @@ in
     hm = {
       programs.gpg = {
         enable = true;
-
         homedir = "${config.dirs.data}/gnupg";
-
-        settings =
-          {
-            display-charset = "utf-8";
-            enable-progress-filter = true;
-            fixed-list-mode = true;
-            keyid-format = "0xlong";
-            no-comments = true;
-            no-emit-version = true;
-            no-greeting = true;
-            with-fingerprint = true;
-            throw-keyids = false;
-
-            use-agent = true;
-
-            armor = true;
-
-            no-random-seed-file = true;
-
-            list-options = "show-uid-validity";
-            verify-options = "show-uid-validity";
-          }
-          // (
-            let
-              cipherAlgos = [
-                "AES256"
-                "AES192"
-                "AES"
-              ];
-              digestAlgos = [
-                "SHA512"
-                "SHA384"
-                "SHA256"
-                "SHA224"
-              ];
-              compressionAlgos = [
-                "ZLIB"
-                "BZIP2"
-                "ZIP"
-                "Uncompressed"
-              ];
-
-              cs = lib.concatStringsSep " ";
-            in
-            {
-              default-preference-list = cs (cipherAlgos ++ digestAlgos ++ compressionAlgos);
-
-              personal-cipher-preferences = cs cipherAlgos;
-              personal-digest-preferences = cs digestAlgos;
-              personal-compress-preferences = cs compressionAlgos;
-
-              s2k-cipher-algo = lib.head cipherAlgos;
-              s2k-digest-algo = lib.head digestAlgos;
-
-              digest-algo = lib.head digestAlgos;
-              cert-digest-algo = lib.head digestAlgos;
-            }
-          );
+        settings = {
+          armor = true;
+          keyid-format = "long";
+          no-greeting = true;
+          no-random-seed-file = true;
+          with-fingerprint = false;
+          with-keygrip = false;
+        };
       };
 
       services.gpg-agent = {
         enable = true;
-
-        enableSshSupport = true;
-        enableScDaemon = false;
-
-        defaultCacheTtl = 999999;
-        defaultCacheTtlSsh = 999999;
-        maxCacheTtl = 999999;
-        maxCacheTtlSsh = 999999;
-
-        grabKeyboardAndMouse = true;
-
-        sshKeys = [ lib.my.pgp.grip ];
-
         pinentryPackage = cfg.pinentry;
       };
     };

Consider giving Nix/NixOS a try! <3