nixos/river: Initial NVMe-oF booting river :)
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 17m32s
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 17m32s
This commit is contained in:
@@ -70,6 +70,7 @@ in
|
||||
let
|
||||
inherit (lib) mkIf mkMerge mkForce;
|
||||
inherit (lib.my) networkdAssignment;
|
||||
inherit (lib.my.c) networkd;
|
||||
in
|
||||
{
|
||||
imports = map (m: import m index) [
|
||||
@@ -106,8 +107,8 @@ in
|
||||
onState = [ "configured" ];
|
||||
script = ''
|
||||
#!${pkgs.runtimeShell}
|
||||
if [ $IFACE = "wan-phy-ifb" ]; then
|
||||
${pkgs.iproute2}/bin/tc filter add dev wan-phy parent ffff: matchall action mirred egress redirect dev $IFACE
|
||||
if [ $IFACE = "wan-ifb" ]; then
|
||||
${pkgs.iproute2}/bin/tc filter add dev wan parent ffff: matchall action mirred egress redirect dev $IFACE
|
||||
fi
|
||||
'';
|
||||
};
|
||||
@@ -138,14 +139,10 @@ in
|
||||
|
||||
netdevs = mkMerge [
|
||||
{
|
||||
"25-wan-phy-ifb".netdevConfig = {
|
||||
Name = "wan-phy-ifb";
|
||||
"25-wan-ifb".netdevConfig = {
|
||||
Name = "wan-ifb";
|
||||
Kind = "ifb";
|
||||
};
|
||||
"25-wan".netdevConfig = {
|
||||
Name = "wan";
|
||||
Kind = "bridge";
|
||||
};
|
||||
"30-lan-core".netdevConfig = {
|
||||
Name = "lan-core";
|
||||
Kind = "macvlan";
|
||||
@@ -156,7 +153,6 @@ in
|
||||
(mkVLAN "lan-hi" vlans.hi)
|
||||
(mkVLAN "lan-lo" vlans.lo)
|
||||
(mkVLAN "lan-untrusted" vlans.untrusted)
|
||||
(mkVLAN "wan-tunnel" vlans.wan)
|
||||
];
|
||||
|
||||
networks =
|
||||
@@ -195,28 +191,9 @@ in
|
||||
in
|
||||
mkMerge [
|
||||
{
|
||||
"50-wan-phy" = {
|
||||
matchConfig.Name = "wan-phy";
|
||||
networkConfig.Bridge = "wan";
|
||||
qdiscConfig = {
|
||||
Parent = "ingress";
|
||||
Handle = "0xffff";
|
||||
};
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
Parent=root
|
||||
Bandwidth=24M
|
||||
RTTSec=1ms
|
||||
'';
|
||||
};
|
||||
"50-wan-phy-ifb" = {
|
||||
matchConfig.Name = "wan-phy-ifb";
|
||||
networkConfig = {
|
||||
LinkLocalAddressing = "no";
|
||||
IPv6AcceptRA = false;
|
||||
LLDP = false;
|
||||
EmitLLDP = false;
|
||||
};
|
||||
"50-wan-ifb" = {
|
||||
matchConfig.Name = "wan-ifb";
|
||||
networkConfig = networkd.noL3;
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
Bandwidth=235M
|
||||
@@ -228,12 +205,6 @@ in
|
||||
CompensationMode=none
|
||||
'';
|
||||
};
|
||||
|
||||
"50-wan-tunnel" = {
|
||||
matchConfig.Name = "wan-tunnel";
|
||||
networkConfig.Bridge = "wan";
|
||||
linkConfig.MTUBytes = "1500";
|
||||
};
|
||||
"50-wan" = mkMerge [
|
||||
(networkdAssignment "wan" assignments.modem)
|
||||
{
|
||||
@@ -247,6 +218,17 @@ in
|
||||
# Gateway = allAssignments.shill.routing.ipv4.address;
|
||||
# }
|
||||
];
|
||||
|
||||
qdiscConfig = {
|
||||
Parent = "ingress";
|
||||
Handle = "0xffff";
|
||||
};
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
Parent=root
|
||||
Bandwidth=24M
|
||||
RTTSec=1ms
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
@@ -254,12 +236,7 @@ in
|
||||
matchConfig.Name = "lan";
|
||||
vlan = [ "lan-hi" "lan-lo" "lan-untrusted" "wan-tunnel" ];
|
||||
macvlan = [ "lan-core" ];
|
||||
networkConfig = {
|
||||
LinkLocalAddressing = "no";
|
||||
IPv6AcceptRA = false;
|
||||
LLDP = false;
|
||||
EmitLLDP = false;
|
||||
};
|
||||
networkConfig = networkd.noL3;
|
||||
};
|
||||
"60-lan-core" = mkMerge [
|
||||
(networkdAssignment "lan-core" assignments.core)
|
||||
|
Reference in New Issue
Block a user