|
9 | 9 | (modulesPath + "/installer/scan/not-detected.nix") |
10 | 10 | ]; |
11 | 11 |
|
12 | | - # without this we get weird delay errors upon nixos-rebuild switch |
13 | | - systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; |
14 | | - networking.useDHCP = lib.mkDefault true; |
15 | | - # AWS VPC DNS resolver — fallback in case dhcpcd doesn't populate resolv.conf. |
| 12 | + # Use systemd-networkd instead of dhcpcd for more predictable DNS management. |
| 13 | + # This avoids resolvconf signature mismatches when resolv.conf is manually edited. |
| 14 | + networking.useDHCP = false; |
| 15 | + networking.useNetworkd = true; |
| 16 | + systemd.network.networks."10-ens5" = { |
| 17 | + matchConfig.Name = "ens5"; |
| 18 | + networkConfig.DHCP = "yes"; |
| 19 | + linkConfig.RequiredForOnline = "yes"; |
| 20 | + }; |
| 21 | + # AWS VPC DNS resolver — fallback in case DHCP doesn't populate resolv.conf. |
16 | 22 | # Without this, ACME cert renewal fails (can't resolve letsencrypt.org). |
17 | 23 | networking.nameservers = [ "172.31.0.2" "169.254.169.253" ]; |
18 | | - # but consider the alternative |
19 | | - # networking.useDHCP = false; |
20 | | - # networking.useNetworkd = true; |
21 | | - # systemd.network.networks."10-ens5" = { |
22 | | - # matchConfig.Name = "ens5"; |
23 | | - # networkConfig.DHCP = "yes"; |
24 | | - # linkConfig.RequiredForOnline = "yes"; |
25 | | - # }; |
| 24 | + # Disable wait-online to avoid deployment timeouts |
| 25 | + systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; |
26 | 26 |
|
27 | 27 | time.timeZone = "Asia/Singapore"; |
28 | 28 |
|
|
0 commit comments