nitrokey ssh still works

This commit is contained in:
Daniel Langbein 2023-09-06 14:57:11 +02:00
parent 4af23fb732
commit 8d59d29881

View File

@ -65,6 +65,9 @@
# ssh nas # ssh nas
#=> Works! #=> Works!
# TODO: What is the difference between programs.gnupg.agent.enableSSHSupport and
# services.gpg-agent.enableSshSupport = true;
services.udev.packages = [ pkgs.nitrokey-udev-rules ]; services.udev.packages = [ pkgs.nitrokey-udev-rules ];
programs = { programs = {
ssh.startAgent = false; ssh.startAgent = false;
@ -89,6 +92,7 @@
services.pcscd.enable = true; services.pcscd.enable = true;
home-manager.users.yoda = { osConfig, config, pkgs, ... }: { home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
# SSH configuration.
programs.ssh = { programs.ssh = {
enable = true; enable = true;
userKnownHostsFile = "~/.ssh/known_hosts ${../assets/ssh/known_hosts}"; userKnownHostsFile = "~/.ssh/known_hosts ${../assets/ssh/known_hosts}";
@ -104,5 +108,31 @@
}; };
}; };
}; };
# GnuPG configuration.
# Examples:
# https://github.com/ioerror/duraconf
# https://gist.github.com/graffen/37eaa2332ee7e584bfda
programs.gpg = {
enable = true;
settings = {
# Display long key IDs
keyid-format = "0xlong";
# List all keys (or the specified ones) along with their fingerprints
with-fingerprint = true;
# Display the calculated validity of user IDs during key listings.
list-options = "show-uid-validity";
verify-options = "show-uid-validity";
};
publicKeys = [
{
source = "${../assets/gpg/pubkey_nitrokey.asc}";
# ultimate
trust = 5;
}
];
};
}; };
} }