networking.hosts = lib.mkMerge [
(lib.mapAttrs' (hostName: host:
lib.nameValuePair host.ipv4 [ "${hostName}.wg" ]) peers)
- { "${peers.losurdo.ipv4}" = [
- "nix-extracache.losurdo.wg"
- "nix-localcache.losurdo.wg"
- ]; }
+ {
+ "${peers.losurdo.ipv4}" = [
+ "nix-extracache.losurdo.wg"
+ "nix-localcache.losurdo.wg"
+ "sftp.losurdo.wg"
+ ];
+ }
];
networking.firewall.extraCommands = lib.optionalString (wg.listenPort != null) ''
ip46tables -A nixos-fw -i any -p udp -m udp --dport ${toString wg.listenPort} -j ACCEPT