dolomite/network: switch to networkd
This commit is contained in:
parent
bba16ea4da
commit
018044aa7d
3 changed files with 15 additions and 35 deletions
|
@ -42,9 +42,19 @@ in
|
|||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.ens18.useDHCP = true;
|
||||
networking.interfaces.ens19.useDHCP = true;
|
||||
networking.useNetworkd = true;
|
||||
systemd.network.networks."10-wan" = {
|
||||
matchConfig.MACAddress = "ens18";
|
||||
networkConfig.DHCP = "ipv4";
|
||||
dhcpV4Config = {
|
||||
UseDNS = false;
|
||||
};
|
||||
};
|
||||
systemd.network.networks."20-lan" = {
|
||||
matchConfig.MACAddress = "ens19";
|
||||
networkConfig.DHCP = "ipv4";
|
||||
};
|
||||
services.resolved.enable = true;
|
||||
|
||||
services.sing-box.settings.dns.strategy = "ipv4_only";
|
||||
};
|
||||
|
|
|
@ -101,29 +101,6 @@ in
|
|||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
dns = {
|
||||
servers = [
|
||||
{
|
||||
tag = "warp";
|
||||
address = "1.1.1.1";
|
||||
detour = "wg-out";
|
||||
}
|
||||
{
|
||||
tag = "directdns";
|
||||
address = "h3://8.8.8.8/dns-query";
|
||||
}
|
||||
];
|
||||
rules = [
|
||||
{
|
||||
outbound = "wg-out";
|
||||
server = "warp";
|
||||
}
|
||||
{
|
||||
outbound = "direct";
|
||||
server = "directdns";
|
||||
}
|
||||
];
|
||||
};
|
||||
inbounds =
|
||||
[
|
||||
{
|
||||
|
@ -182,17 +159,9 @@ in
|
|||
type = "direct";
|
||||
tag = "direct";
|
||||
}
|
||||
{
|
||||
type = "dns";
|
||||
tag = "dns-out";
|
||||
}
|
||||
];
|
||||
route = {
|
||||
rules = [
|
||||
{
|
||||
outbound = "dns-out";
|
||||
protocol = "dns";
|
||||
}
|
||||
{
|
||||
inbound = "sg0";
|
||||
outbound = "direct";
|
||||
|
|
|
@ -103,7 +103,8 @@ in
|
|||
environment.systemPackages = [ pkgs.cryptsetup ];
|
||||
|
||||
# EC2 has its own NTP server provided by the hypervisor
|
||||
networking.timeServers = [ "169.254.169.123" ];
|
||||
services.timesyncd.enable = true;
|
||||
services.timesyncd.servers = [ "169.254.169.123" ];
|
||||
|
||||
# udisks has become too bloated to have in a headless system
|
||||
# (e.g. it depends on GTK).
|
||||
|
|
Loading…
Reference in a new issue