dotfiles/nix/home-manager/modules/gpg.nix
Magic_RB 58256ab22a
GPG test
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2021-02-28 20:42:10 +01:00

26 lines
537 B
Nix

{ nixpkgs, nixpkgs-unstable, nixpkgs-master, custom, hostname, rlib }:
{ config, lib, ... }:
{
home.packages = [
custom.gpg-key
nixpkgs.gnupg
];
services.gpg-agent = {
pinentryFlavor = "gtk2";
enable = true;
enableSshSupport = true;
};
home.file.".profile".text = ''
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
'';
home.activation.gnupghome = config.lib.dag.entryAfter ["writeBoundary"] ''
if [ ! -e ~/.gnupg ]
then
ln -sf /mnt/key/gnupg ~/.gnupg
fi
'';
}