os/modules/crypto/default.nix

37 lines
751 B
Nix

{
lib,
config,
pkgs,
...
}:
with lib; let
psCfg = config.pub-solar;
in {
services.dbus.packages = [pkgs.gcr];
services.pcscd.enable = true;
services.udev.packages = [pkgs.yubikey-personalization];
services.gnome.gnome-keyring.enable = true;
hardware.gpgSmartcards.enable = true; # for yubikey
users.users."${psCfg.user.name}".packages = with pkgs; [
libsecret
gnupg
];
programs.ssh.startAgent = false;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
enableExtraSocket = true;
pinentryPackage = pkgs.pinentry-gnome3;
};
home-manager.users."${psCfg.user.name}" = {
home.file.".gnupg/scdaemon.conf".text = ''
reader-port Yubico Yubi
disable-ccid
'';
};
}