hosts: working vswitch with vlans
This commit is contained in:
parent
f8e8831622
commit
9f83338d6d
@ -109,8 +109,27 @@
|
|||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
vswitches = {
|
||||||
|
vs0 = {
|
||||||
|
interfaces = {
|
||||||
|
enp34s0 = { };
|
||||||
|
lo1 = {
|
||||||
|
type = "internal";
|
||||||
|
};
|
||||||
|
enp34s0iot = {
|
||||||
|
type = "internal";
|
||||||
|
vlan = 100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# extraOvsctlCmds = ''
|
||||||
|
# set port enp34s0 vlan_mode=native-tagged
|
||||||
|
# set port enp34s0 trunks=1,100
|
||||||
|
# set port enp34s0 tag=1
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
};
|
||||||
useDHCP = false; # Deprecated
|
useDHCP = false; # Deprecated
|
||||||
hostName = "nas";
|
hostName = "hades";
|
||||||
domain = "home.opel-online.de";
|
domain = "home.opel-online.de";
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -118,25 +137,22 @@
|
|||||||
timeServers = [
|
timeServers = [
|
||||||
"192.168.2.1"
|
"192.168.2.1"
|
||||||
];
|
];
|
||||||
vlans = {
|
|
||||||
vlan100 = {
|
|
||||||
id = 100;
|
|
||||||
interface = "enp34s0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
enp34s0 = {
|
#enp34s0 = {
|
||||||
useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
# useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
||||||
#ipv4.addresses = [ {
|
# #ipv4.addresses = [ {
|
||||||
# address = "192.168.0.51";
|
# # address = "192.168.0.51";
|
||||||
# prefixLength = 24;
|
# # prefixLength = 24;
|
||||||
#} ];
|
# #} ];
|
||||||
};
|
#};
|
||||||
|
#enp34s0iot.useDHCP = true;
|
||||||
|
lo1.useDHCP = true;
|
||||||
};
|
};
|
||||||
#defaultGateway = "192.168.0.1";
|
#defaultGateway = "192.168.0.1";
|
||||||
defaultGateway6 = {
|
defaultGateway6 = {
|
||||||
address = "fe80::1";
|
address = "fe80::1";
|
||||||
interface = "enp34s0";
|
#interface = "enp34s0";
|
||||||
|
interface = "lo1";
|
||||||
};
|
};
|
||||||
#nameservers = [ "192.168.0.4" ];
|
#nameservers = [ "192.168.0.4" ];
|
||||||
#firewall = {
|
#firewall = {
|
||||||
|
@ -101,7 +101,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
{ device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
@ -174,6 +173,18 @@
|
|||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
vswitches = {
|
||||||
|
vs0 = {
|
||||||
|
interfaces = {
|
||||||
|
enp0s31f6 = { };
|
||||||
|
lo1 = {
|
||||||
|
type = "internal";
|
||||||
|
};
|
||||||
|
enp0s31f6iot = {
|
||||||
|
type = "internal";
|
||||||
|
vlan = 100;
|
||||||
|
};
|
||||||
|
};
|
||||||
useDHCP = false; # Deprecated
|
useDHCP = false; # Deprecated
|
||||||
hostName = "nas";
|
hostName = "nas";
|
||||||
domain = "home.opel-online.de";
|
domain = "home.opel-online.de";
|
||||||
@ -190,8 +201,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
interfaces = {
|
interfaces = {
|
||||||
enp0s31f6 = {
|
# enp0s31f6 = {
|
||||||
useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
# useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
||||||
# ipv4.addresses = [ {
|
# ipv4.addresses = [ {
|
||||||
# address = "45.142.114.153";
|
# address = "45.142.114.153";
|
||||||
# prefixLength = 24;
|
# prefixLength = 24;
|
||||||
@ -201,11 +212,13 @@
|
|||||||
# prefixLength = 64;
|
# prefixLength = 64;
|
||||||
# } ];
|
# } ];
|
||||||
};
|
};
|
||||||
|
lo1.useDHCP = true;
|
||||||
};
|
};
|
||||||
# defaultGateway = "45.142.114.1";
|
# defaultGateway = "45.142.114.1";
|
||||||
defaultGateway6 = {
|
defaultGateway6 = {
|
||||||
address = "fe80::1";
|
address = "fe80::1";
|
||||||
interface = "enp0s31f6";
|
#interface = "enp0s31f6";
|
||||||
|
interface = "lo1";
|
||||||
};
|
};
|
||||||
# nameservers = [ "9.9.9.9" "2620:fe::fe" ];
|
# nameservers = [ "9.9.9.9" "2620:fe::fe" ];
|
||||||
#firewall = {
|
#firewall = {
|
||||||
|
Loading…
Reference in New Issue
Block a user