Merge pull request #34 from mystfox/wg-youko

fix network for hosts other than marisa, whoops
This commit is contained in:
katrin 2021-10-25 19:34:13 +01:00 committed by GitHub
commit a56d48f5a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, sources, ... }: with lib; { config, lib, pkgs, sources, meta, ... }: with lib;
{ {
options.network = with lib; { options.network = with lib; {
@ -27,7 +27,7 @@
networking.firewall.extraCommands = '' networking.firewall.extraCommands = ''
ip6tables -A INPUT -p 89 -i wgmesh-+ -j ACCEPT ip6tables -A INPUT -p 89 -i wgmesh-+ -j ACCEPT
${if config.networking.hostName != "marisa" then "ip route replace to 10.42.68.0/24 via ${nodes.marisa.network.addresses.yggdrasil.nixos.ipv4.address}" else ""} ${if config.networking.hostName != "marisa" then "ip route replace to 10.42.68.0/24 via ${meta.network.nodes.marisa.network.addresses.wireguard.nixos.ipv4.address}" else ""}
''; '';
networking.nftables.extraInput = '' networking.nftables.extraInput = ''
meta l4proto 89 iifname wgmesh-* accept meta l4proto 89 iifname wgmesh-* accept