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