This commit is contained in:
@@ -172,11 +172,19 @@
|
||||
};
|
||||
memory = 32768;
|
||||
cleanShutdown.timeout = 120;
|
||||
networks.netboot = {
|
||||
bridge = "lan-lo";
|
||||
waitOnline = "carrier";
|
||||
mac = "52:54:00:a5:7e:93";
|
||||
extraOptions.bootindex = 1;
|
||||
networks = {
|
||||
netboot = {
|
||||
bridge = "lan-lo";
|
||||
waitOnline = "carrier";
|
||||
mac = "52:54:00:a5:7e:93";
|
||||
extraOptions.bootindex = 1;
|
||||
};
|
||||
core = {
|
||||
bridge = "lan-core";
|
||||
ifname = "vm-sfh-core";
|
||||
waitOnline = "carrier";
|
||||
mac = "52:54:00:72:67:51";
|
||||
};
|
||||
};
|
||||
hostDevices = {
|
||||
et100g0vf2 = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
# ./unifi.nix
|
||||
./unifi.nix
|
||||
./hass.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,6 +24,15 @@ in
|
||||
address = net.cidr.host (65536*5+1) prefixes.hi.v6;
|
||||
};
|
||||
};
|
||||
core = {
|
||||
inherit domain;
|
||||
name = "unifi-ctr-core";
|
||||
mtu = 1500;
|
||||
ipv4 = {
|
||||
address = net.cidr.host 21 prefixes.core.v4;
|
||||
gateway = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configuration = { lib, config, pkgs, assignments, ... }:
|
||||
@@ -48,7 +57,10 @@ in
|
||||
};
|
||||
|
||||
systemd = {
|
||||
network.networks."80-container-host0" = networkdAssignment "host0" assignments.hi;
|
||||
network.networks = {
|
||||
"80-container-host0" = networkdAssignment "host0" assignments.hi;
|
||||
"80-lan-core" = networkdAssignment "lan-core" assignments.core;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
@@ -111,6 +111,13 @@ in
|
||||
MTUBytes = toString lib.my.c.home.hiMTU;
|
||||
};
|
||||
};
|
||||
"10-lan-core-ctrs" = {
|
||||
matchConfig = {
|
||||
Driver = "virtio_net";
|
||||
PermanentMACAddress = "52:54:00:72:67:51";
|
||||
};
|
||||
linkConfig.Name = "lan-core-ctrs";
|
||||
};
|
||||
"10-lan-lo-ctrs" = {
|
||||
matchConfig = {
|
||||
Driver = "virtio_net";
|
||||
@@ -131,6 +138,11 @@ in
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
networkConfig = networkd.noL3;
|
||||
};
|
||||
"30-lan-core-ctrs" = {
|
||||
matchConfig.Name = "lan-core-ctrs";
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
networkConfig = networkd.noL3;
|
||||
};
|
||||
"30-lan-lo-ctrs" = {
|
||||
matchConfig.Name = "lan-lo-ctrs";
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
@@ -145,6 +157,11 @@ in
|
||||
MACVLAN = mkForce "lan-hi-ctrs:host0 lan-lo-ctrs:lan-lo";
|
||||
};
|
||||
};
|
||||
unifi = {
|
||||
networkConfig = {
|
||||
MACVLAN = mkForce "lan-hi-ctrs:host0 lan-core-ctrs:lan-core";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
@@ -174,7 +191,7 @@ in
|
||||
containers.instances =
|
||||
let
|
||||
instances = {
|
||||
# unifi = {};
|
||||
unifi = {};
|
||||
hass = {
|
||||
bindMounts = {
|
||||
"/dev/bus/usb/001/002".readOnly = false;
|
||||
|
||||
Reference in New Issue
Block a user