Skip to content

Commit

Permalink
think the ssh config was outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
otosky committed Apr 20, 2024
1 parent 445a252 commit c520dff
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions homes/_modules/base/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ in {
programs.ssh = {
enable = true;
matchBlocks = {
trusted = {
host = "github.com" + (builtins.concatStringsSep " " hostnames);
net = {
host = builtins.concatStringsSep " " hostnames;
forwardAgent = true;
remoteForwards = [
{
bind.address = ''/%d/.gnupg-sockets/S.gpg-agent'';
host.address = ''/%d/.gnupg-sockets/S.gpg-agent.extra'';
}
];
};
trusted = lib.hm.dag.entryBefore ["net"] {
host = "github.com";
forwardAgent = true;
};
};
};
services.ssh-agent.enable = true;

home.sessionVariables = lib.mkIf config.gtk.enable {
SSH_ASKPASS_REQUIRE = "prefer";
SSH_ASKPASS = "${pkgs.gnome.seahorse}/libexec/seahorse/ssh-askpass";
};

systemd.user.services.ssh-agent.Service.Environment = [
"SSH_ASKPASS=${config.home.sessionVariables.SSH_ASKPASS or ""}"
];
home.persistence = {
"/persist/home/olivertosky".directories = [".ssh"];
};
Expand Down

0 comments on commit c520dff

Please sign in to comment.