mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-26 10:06:13 +01:00
28 lines
552 B
Nix
28 lines
552 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
|
|
'';
|
|
}
|
|
|
|
# another one
|