manatee: Add home-assistant module

This commit is contained in:
Alexander Heldt
2026-01-05 17:43:48 +01:00
parent 209c2f7c81
commit 61c73fcfaf
3 changed files with 115 additions and 0 deletions

View File

@@ -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
'';
};
}