mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
parent
13a110e696
commit
263185aa68
@ -9,6 +9,12 @@ let
|
|||||||
interfaces = attrValues cfg.interfaces;
|
interfaces = attrValues cfg.interfaces;
|
||||||
hasVirtuals = any (i: i.virtual) interfaces;
|
hasVirtuals = any (i: i.virtual) interfaces;
|
||||||
|
|
||||||
|
slaves = concatMap (i: i.interfaces) (attrValues cfg.bonds)
|
||||||
|
++ concatMap (i: i.interfaces) (attrValues cfg.bridges)
|
||||||
|
++ concatMap (i: i.interfaces) (attrValues cfg.vswitches)
|
||||||
|
++ concatMap (i: [i.interface]) (attrValues cfg.macvlans)
|
||||||
|
++ concatMap (i: [i.interface]) (attrValues cfg.vlans);
|
||||||
|
|
||||||
# We must escape interfaces due to the systemd interpretation
|
# We must escape interfaces due to the systemd interpretation
|
||||||
subsystemDevice = interface:
|
subsystemDevice = interface:
|
||||||
"sys-subsystem-net-devices-${escapeSystemdPath interface}.device";
|
"sys-subsystem-net-devices-${escapeSystemdPath interface}.device";
|
||||||
@ -469,5 +475,8 @@ in
|
|||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
bondWarnings
|
bondWarnings
|
||||||
(mkIf (!cfg.useNetworkd) normalConfig)
|
(mkIf (!cfg.useNetworkd) normalConfig)
|
||||||
|
{ # Ensure slave interfaces are brought up
|
||||||
|
networking.interfaces = genAttrs slaves (i: {});
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user