nixfmt-rfc-style
There is nothing in this commit except for the changes made by nix-shell -p nixfmt-rfc-style --run "nixfmt ." If this has mucked up your open branches then sorry about that. You can probably nixfmt them to match before merging
This commit is contained in:
@@ -6,8 +6,12 @@
|
||||
## with one or more WLANs so that several local devices appear to be
|
||||
## on the same network.
|
||||
|
||||
|
||||
{ lib, pkgs, config, ...}:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
inherit (pkgs) liminix;
|
||||
@@ -40,13 +44,15 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
config.kernel.config = {
|
||||
BRIDGE = "y";
|
||||
BRIDGE_IGMP_SNOOPING = "y";
|
||||
} // lib.optionalAttrs (config.system.service ? vlan) {
|
||||
# depends on bridge _and_ vlan. I would like there to be
|
||||
# a better way to test for the existence of vlan config:
|
||||
# maybe the module should set an `enabled` attribute?
|
||||
BRIDGE_VLAN_FILTERING = "y";
|
||||
};
|
||||
config.kernel.config =
|
||||
{
|
||||
BRIDGE = "y";
|
||||
BRIDGE_IGMP_SNOOPING = "y";
|
||||
}
|
||||
// lib.optionalAttrs (config.system.service ? vlan) {
|
||||
# depends on bridge _and_ vlan. I would like there to be
|
||||
# a better way to test for the existence of vlan config:
|
||||
# maybe the module should set an `enabled` attribute?
|
||||
BRIDGE_VLAN_FILTERING = "y";
|
||||
};
|
||||
}
|
||||
|
@@ -1,21 +1,25 @@
|
||||
{
|
||||
liminix
|
||||
, ifwait
|
||||
, svc
|
||||
liminix,
|
||||
ifwait,
|
||||
svc,
|
||||
}:
|
||||
{ members, primary } :
|
||||
{ members, primary }:
|
||||
|
||||
let
|
||||
inherit (liminix.networking) interface;
|
||||
inherit (liminix.services) bundle oneshot;
|
||||
addif = member :
|
||||
addif =
|
||||
member:
|
||||
# how do we get sight of services from here? maybe we need to
|
||||
# implement ifwait as a regualr derivation instead of a
|
||||
# servicedefinition
|
||||
svc.ifwait.build {
|
||||
state = "running";
|
||||
interface = member;
|
||||
dependencies = [ primary member ];
|
||||
dependencies = [
|
||||
primary
|
||||
member
|
||||
];
|
||||
service = oneshot {
|
||||
name = "${primary.name}.member.${member.name}";
|
||||
up = ''
|
||||
@@ -24,7 +28,8 @@ let
|
||||
down = "ip link set dev $(output ${member} ifname) nomaster";
|
||||
};
|
||||
};
|
||||
in bundle {
|
||||
in
|
||||
bundle {
|
||||
name = "${primary.name}.members";
|
||||
contents = map addif members;
|
||||
}
|
||||
|
@@ -1,11 +1,12 @@
|
||||
{
|
||||
liminix
|
||||
, lib
|
||||
liminix,
|
||||
lib,
|
||||
}:
|
||||
{ ifname } :
|
||||
{ ifname }:
|
||||
let
|
||||
inherit (liminix.services) oneshot;
|
||||
in oneshot rec {
|
||||
in
|
||||
oneshot rec {
|
||||
name = "${ifname}.link";
|
||||
up = ''
|
||||
ip link add name ${ifname} type bridge
|
||||
|
Reference in New Issue
Block a user