manatee: Add home-assistant module
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
networking = {
|
||||
hostName = "manatee";
|
||||
|
||||
# Required for asymmetric routing (sending replies out a different interface
|
||||
# than the default route). Without this, the kernel drops the return traffic.
|
||||
firewall.checkReversePath = "loose";
|
||||
|
||||
defaultGateway = "192.168.50.1";
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
interfaces = {
|
||||
@@ -16,7 +20,25 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
ipv4.routes = [
|
||||
{
|
||||
address = "0.0.0.0";
|
||||
prefixLength = 0;
|
||||
via = "192.168.50.1"; # Router
|
||||
options = {
|
||||
table = "100";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Route packets from machines local IP back to router
|
||||
localCommands = ''
|
||||
# Add the rule only if it doesn't exist yet (idempotent)
|
||||
ip rule list | grep -q "from 192.168.50.203 lookup 100" || \
|
||||
ip rule add from 192.168.50.203 lookup 100 priority 5000
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user