1
0
Fork 0

sail: switch to networkd

This commit is contained in:
Daniel Kempkens 2023-03-28 17:42:22 +02:00
parent cb2596c072
commit 417ff3a9b4
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -96,32 +96,59 @@ in
zramSwap.enable = true; zramSwap.enable = true;
networking = { systemd.network = {
hostName = "sail"; enable = true;
interfaces = { networks = {
enp1s0.ipv6.addresses = secret.networking.interfaces.enp1s0.ipv6.addresses; "10-wan" = {
matchConfig.Name = "enp1s0";
networkConfig = {
DHCP = "ipv4";
IPv6AcceptRA = true;
};
linkConfig.RequiredForOnline = "routable";
enp7s0.ipv4 = { ntp = [
addresses = [{ address = "10.99.99.2"; prefixLength = 32; }]; "ntp1.hetzner.de"
"ntp2.hetzner.com"
routes = [ "ntp3.hetzner.net"
{ address = "10.99.99.1"; prefixLength = 32; }
{ address = "10.99.99.0"; prefixLength = 24; via = "10.99.99.1"; }
]; ];
}; };
"20-private" = {
matchConfig.Name = "enp7s0";
address = [ "10.99.99.2/24" ];
};
}; };
};
defaultGateway6 = { address = "fe80::1"; interface = "enp1s0"; }; networking = {
hostName = "sail";
useNetworkd = true;
dhcpcd.denyInterfaces = [ "enp7s0" "veth*" ]; # interfaces = {
# enp1s0.ipv6.addresses = secret.networking.interfaces.enp1s0.ipv6.addresses;
timeServers = [ #
"ntp1.hetzner.de" # enp7s0.ipv4 = {
"ntp2.hetzner.com" # addresses = [{ address = "10.99.99.2"; prefixLength = 32; }];
"ntp3.hetzner.net" #
"time.cloudflare.com" # routes = [
]; # { address = "10.99.99.1"; prefixLength = 32; }
# { address = "10.99.99.0"; prefixLength = 24; via = "10.99.99.1"; }
# ];
# };
# };
#
# defaultGateway6 = { address = "fe80::1"; interface = "enp1s0"; };
#
# dhcpcd.denyInterfaces = [ "enp7s0" "veth*" ];
#
# timeServers = [
# "ntp1.hetzner.de"
# "ntp2.hetzner.com"
# "ntp3.hetzner.net"
# "time.cloudflare.com"
# ];
}; };
services.journald.extraConfig = '' services.journald.extraConfig = ''