diff options
Diffstat (limited to 'home-manager/config')
-rwxr-xr-x | home-manager/config/gpg/agent-program | 2 | ||||
-rw-r--r-- | home-manager/config/gpg/default.nix | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/home-manager/config/gpg/agent-program b/home-manager/config/gpg/agent-program new file mode 100755 index 00000000..8817a1a2 --- /dev/null +++ b/home-manager/config/gpg/agent-program @@ -0,0 +1,2 @@ +#!/bin/sh +onlykey-gpg-agent -vv --skey-slot=ECC32 --dkey-slot=ECC32 "$@" diff --git a/home-manager/config/gpg/default.nix b/home-manager/config/gpg/default.nix index ae5a36ad..748bd0d7 100644 --- a/home-manager/config/gpg/default.nix +++ b/home-manager/config/gpg/default.nix @@ -1,8 +1,18 @@ { config, + sysLib, pkgs, ... -}: { +}: let + agent-program = sysLib.makeShellScriptWithLibrary { + name = "onlykey-gpg-agent"; + script = ./agent-program; + dependencies = with pkgs; [ + python3 + onlykey-agent + ]; + }; +in { programs.gpg = { enable = true; homedir = "${config.xdg.dataHome}/gnupg/onlykey"; @@ -10,7 +20,8 @@ mutableTrust = false; settings = { # Hardware-based GPG configuration - agent-program = "/home/soispha/.local/share/gnupg/onlykey/run-agent.sh"; + agent-program = "${agent-program}/bin/onlykey-gpg-agent"; + default-key = "Soispha <soispha@vhack.eu>"; # TODO add more }; |