2018-11-22 00:33:10 +01:00
|
|
|
# Global configuration for mininet
|
|
|
|
# kernel must have NETNS/VETH/SCHED
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
2023-11-27 04:29:51 +01:00
|
|
|
cfg = config.programs.mininet;
|
2018-11-22 00:33:10 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.mininet.enable = mkEnableOption (lib.mdDoc "Mininet");
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
virtualisation.vswitch.enable = true;
|
|
|
|
|
2023-12-07 08:19:00 +01:00
|
|
|
environment.systemPackages = [ pkgs.mininet ];
|
2018-11-22 00:33:10 +01:00
|
|
|
};
|
|
|
|
}
|