mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-15 00:36:25 +00:00
28 lines
658 B
Nix
28 lines
658 B
Nix
|
{ outputs, lib, ... }:
|
||
|
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" ] {
|
||
|
host = "m7.rs *.m7.rs *.ts.m7.rs";
|
||
|
forwardAgent = true;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
home.persistence = {
|
||
|
"/persist/home/misterio".directories = [ ".ssh" ];
|
||
|
};
|
||
|
}
|