1

Use systemd-networkd system module

This commit is contained in:
2023-05-24 14:43:26 +02:00
parent ea8769ffdc
commit a0e76cb49b
3 changed files with 34 additions and 228 deletions

View File

@ -28,45 +28,6 @@
videoDrivers = ["amdgpu"];
};
# TODO: System module for this
systemd.network = let
# eth-interface = "enp0s31f6";
eth-interface = "enp*";
# wireless-interface = "wlp5s0";
wireless-interface = "wlp*";
in {
enable = true;
# LAN
networks."50-ether" = {
# name = "enp0s31f6"; # Network interface name?
enable = true;
# See man systemd.link, man systemd.netdev, man systemd.network
matchConfig = {
# This corresponds to the [MATCH] section
Name = eth-interface; # Match ethernet interface
};
# See man systemd.network
networkConfig = {
# This corresponds to the [NETWORK] section
DHCP = "yes";
# TODO: What does this all do?
# IPv6AcceptRA = true;
# MulticastDNS = "yes"; # Needed?
# LLMNR = "no"; # Needed?
# LinkLocalAddressing = "no"; # Needed?
};
linkConfig = {
# This corresponds to the [LINK] section
# RequiredForOnline = "routable";
};
};
};
# TODO: System module for these
# TODO: I also want a function to generate these configs, I just want to pass volumes, ports, env and image
virtualisation.oci-containers.containers = {