fix ssh, gpg agent

This commit is contained in:
Dmitriy Kholkin 2021-09-15 18:39:44 +03:00
parent 8131a1aca2
commit 5d58b2fc54
2 changed files with 18 additions and 16 deletions

View File

@ -8,9 +8,8 @@
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
enableSshSupport = true; enableSshSupport = true;
pinentryFlavor = "gnome3"; pinentryFlavor = "gtk2";
sshKeys = [ sshKeys = [
# "E6A6377C3D0827C36428A290199FDB3B91414AFE"
"7A7130ABF128CC2C32B3D6AD27515056B0193CE1" "7A7130ABF128CC2C32B3D6AD27515056B0193CE1"
]; ];
}; };

View File

@ -1,19 +1,22 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
services.openssh = {
enable = true;
passwordAuthentication = false;
permitRootLogin = "no";
forwardX11 = true;
extraConfig = "StreamLocalBindUnlink yes";
ports = [ 22 ];
};
home-manager.users.alukard = { home-manager.users.alukard = {
# programs.ssh = { programs.ssh = {
# enable = true; enable = true;
# forwardAgent = true; matchBlocks = {
# extraOptions = { "*" = {
# # Host = "localhost"; compression = false;
# AddKeysToAgent = "ask"; };
# } };
# }; };
home.file.".ssh/config".text = ''
Host localhost
ForwardAgent yes
AddKeysToAgent ask
Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"
'';
}; };
} }