hosts: desktop: move to systemd-networkd

This commit is contained in:
Kabbone 2023-10-09 15:18:59 +02:00
parent 7a43ba3cfb
commit 0ecbf4169c
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
2 changed files with 16 additions and 48 deletions

View File

@ -116,60 +116,29 @@
swapDevices = [ { device = "/swap/swapfile"; } ];
networking = {
vswitches = {
vs0 = {
interfaces = {
enp34s0 = { };
lo1 = {
type = "internal";
};
#enp34s0iot = {
# type = "internal";
# vlan = 100;
#};
};
};
};
useDHCP = false; # Deprecated
hostName = "hades";
domain = "home.opel-online.de";
networkmanager = {
enable = false;
};
timeServers = [
"192.168.2.1"
];
interfaces = {
#enp34s0 = {
# useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
# #ipv4.addresses = [ {
# # address = "192.168.0.51";
# # prefixLength = 24;
# #} ];
#};
#enp34s0iot.useDHCP = true;
lo1 = {
useDHCP = true;
macAddress = "1a:20:e9:ce:9c:1a";
};
};
#defaultGateway = "192.168.0.1";
defaultGateway6 = {
address = "fe80::1";
interface = "lo1";
};
#nameservers = [ "192.168.0.4" ];
#firewall = {
# enable = false;
# #allowedUDPPorts = [ 53 67 ];
# #allowedTCPPorts = [ 53 80 443 9443 ];
#};
};
systemd.services = {
"ovsdb".partOf = [ "network-setup.service" ];
"ovs-vswitchd".partOf = [ "network-setup.service" ];
"network-addresses-lo1".partOf = [ "network-setup.service" ];
systemd.network = {
enable = true;
networks = {
"10-lan" = {
matchConfig.Name = "enp34s0";
ntp = [ "192.168.2.1" ];
domains = [ "home.opel-online.de" ];
ipv6AcceptRAConfig = {
DHCPv6Client = "always";
UseDNS = true;
};
networkConfig = {
DHCP = "yes";
};
};
};
};
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View File

@ -14,7 +14,6 @@
users.groups.libvirtd.members = [ "root" "${user}" ];
virtualisation = {
vswitch.enable = true;
libvirtd = {
enable = true; # Virtual drivers
onShutdown = "shutdown";