Files
nix-config/modules/nixos/desktop/security.nix
2025-07-29 13:47:14 +08:00

32 lines
873 B
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
config,
pkgs,
...
}:
{
# security with polkit
security.polkit.enable = true;
# security with gnome-kering
services.gnome = {
gnome-keyring.enable = true;
# Use gnome keyring's SSH Agent
# https://wiki.gnome.org/Projects/GnomeKeyring/Ssh
gcr-ssh-agent.enable = false;
};
# seahorse is a GUI App for GNOME Keyring.
programs.seahorse.enable = true;
# The OpenSSH agent remembers private keys for you
# so that you dont have to type in passphrases every time you make an SSH connection.
# Use `ssh-add` to add a key to the agent.
programs.ssh.startAgent = true;
security.pam.services.greetd.enableGnomeKeyring = true;
# gpg agent with pinentry
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-qt;
enableSSHSupport = false;
settings.default-cache-ttl = 4 * 60 * 60; # 4 hours
};
}