diff options
Diffstat (limited to 'host.nix')
| -rw-r--r-- | host.nix | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -147,6 +147,10 @@ in { fcbr0.ipv4.addresses = [{ address = "172.16.0.1"; prefixLength = 24; }]; }; networking.bridges.fcbr0.interfaces = tapNames; + # With networkd, fcbr0 would only get its address while it has carrier, + # i.e. while a VM runs, so nginx couldn't bind to it before. (Unused + # with scripted networking, which assigns it regardless.) + systemd.network.networks."40-fcbr0".networkConfig.ConfigureWithoutCarrier = true; # Only rejects; for anything else the host's own forward chain decides. networking.nftables.enable = true; @@ -197,11 +201,13 @@ in { ]; # nginx binds to 172.16.0.1, so it has to wait for fcbr0's address - # (network-addresses-fcbr0.service with scripted networking; else - # Restart= gets it there). On reload, sniConfig regenerates the map and + # (network-addresses-fcbr0.service with scripted networking; with + # networkd, nothing to order after, so it keeps restarting, without start + # limit, until the address is there). On reload, sniConfig regenerates the map and # nginx re-reads its config on SIGHUP; if that fails, it keeps the old. systemd.services.fcbr0-sni = { wantedBy = [ "multi-user.target" ]; + startLimitIntervalSec = 0; after = [ "network.target" "network-addresses-fcbr0.service" "systemd-tmpfiles-setup.service" ]; serviceConfig = { ExecStartPre = sniConfig; |
