2024-05-03 01:36:17 +00:00
|
|
|
{ outputs, lib, username, ... }:
|
2023-09-15 14:53:38 +00:00
|
|
|
let
|
|
|
|
hostnames = builtins.attrNames outputs.nixosConfigurations;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
matchBlocks = {
|
|
|
|
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" ] {
|
2023-09-19 17:05:08 +00:00
|
|
|
host = "burd.me *.burd.me *.ts.burd.me";
|
2023-09-15 14:53:38 +00:00
|
|
|
forwardAgent = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home.persistence = {
|
2024-05-03 01:36:17 +00:00
|
|
|
"/persist/home/${username}".directories = [ ".ssh" ];
|
2023-09-15 14:53:38 +00:00
|
|
|
};
|
|
|
|
}
|