about summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-02-09 18:04:59 -0800
committerFranck Cuny <franck@fcuny.net>2023-02-09 18:04:59 -0800
commitb46adddf2590450f6452269c30437cc02b5a9c40 (patch)
tree8361950d84c3b4a0dbe41121da04f5874ac02c5a /home
parentref(home/swaylock): different background color (diff)
downloadworld-b46adddf2590450f6452269c30437cc02b5a9c40.tar.gz
ref(home/gpg): install ykman and more configurations for GPG
Installing the yubikey manager (ykman) to help managing the keys.

Add more configurations for GPG related to keys.
Diffstat (limited to '')
-rw-r--r--home/gpg/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/home/gpg/default.nix b/home/gpg/default.nix
index 9513185..9392961 100644
--- a/home/gpg/default.nix
+++ b/home/gpg/default.nix
@@ -1,4 +1,4 @@
-{ config, lib, ... }:
+{ pkgs, config, lib, ... }:
 let cfg = config.my.home.gpg;
 in
 {
@@ -18,10 +18,19 @@ in
   };
 
   config = lib.mkIf cfg.enable {
+    home.packages = with pkgs; [ yubikey-manager ];
+
     programs.gpg = {
       enable = true;
       homedir = "${config.xdg.configHome}/gnupg";
-      settings = { default-key = cfg.defaultKey; };
+      settings = {
+        default-key = cfg.defaultKey;
+        personal-cipher-preferences = "AES256 AES192 AES";
+        personal-digest-preferences = "SHA512 SHA384 SHA256";
+        personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
+        keyid-format = "long";
+        with-fingerprint = true;
+      };
     };
     services.gpg-agent = {
       enable = true;