home/ssh: forward everything to all of my subdomains

This commit is contained in:
Gabriel Fontes
2022-08-21 18:02:10 -03:00
parent 775a37a163
commit d01eb5f002
+2 -6
View File
@@ -1,17 +1,13 @@
{ outputs, hostname, persistence, lib, ... }:
let
notSelf = n: n != hostname;
hosts = builtins.filter notSelf (builtins.attrNames outputs.nixosConfigurations);
hostnames = hosts
++ (map (h: "${h}.misterio.me") hosts)
++ (map (h: "${h}.fontes.dev.br") hosts)
++ (map (h: "${h}.ts.fontes.dev.br") hosts);
hostnames = builtins.filter notSelf (builtins.attrNames outputs.nixosConfigurations);
in
{
programs.ssh = {
enable = true;
matchBlocks.home = {
host = builtins.concatStringsSep " " hostnames;
host = builtins.concatStringsSep " " (hostnames ++ [ "fontes.dev.br" "*.fontes.dev.br" "misterio.me" "*.misterio.me" ]);
forwardAgent = true;
remoteForwards = [{
bind.address = ''/run/user/1000/gnupg/S.gpg-agent'';