summaryrefslogtreecommitdiffstats
path: root/nixos/modules/programs/mininet.nix
blob: e68000f57c9997fae28519a1f8597b49afab10ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Global configuration for mininet
# kernel must have NETNS/VETH/SCHED
{
  config,
  lib,
  pkgs,
  ...
}:

let
  cfg = config.programs.mininet;
in
{
  options.programs.mininet.enable = lib.mkEnableOption "Mininet, an emulator for rapid prototyping of Software Defined Networks";

  config = lib.mkIf cfg.enable {

    virtualisation.vswitch.enable = true;

    environment.systemPackages = [ pkgs.mininet ];
  };
}