Nix wrapper for Faucet SDN — the production OpenFlow controller.
Add to your flake inputs:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
faucet-nix = {
url = "github:your-org/faucet-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}{
imports = [ inputs.faucet-nix.nixosModules.default ];
services.faucet = {
enable = true;
configFile = ./faucet.yaml;
};
}| Option | Type | Default | Description |
|---|---|---|---|
enable |
bool | false |
Enable Faucet OpenFlow controller |
package |
package | faucet |
Faucet package to use |
configFile |
path | bundled example | Path to faucet.yaml |
ryuConfig |
path | bundled example | Path to Ryu/os-ken framework config |
listenPort |
port | 6653 |
OpenFlow TCP listen port |
prometheusPort |
port | 9302 |
Prometheus metrics port |
logDir |
path | /var/log/faucet |
Log directory |
extraArgs |
list of string | [] |
Extra arguments |
| Option | Type | Default | Description |
|---|---|---|---|
enable |
bool | false |
Enable Gauge statistics controller |
package |
package | faucet |
Faucet package (same, gauge entry point) |
configFile |
path | bundled example | Path to gauge.yaml |
ryuConfig |
path | bundled example | Path to Ryu/os-ken framework config |
listenPort |
port | 6654 |
OpenFlow TCP listen port |
logDir |
path | /var/log/faucet |
Log directory |
extraArgs |
list of string | [] |
Extra arguments |
The bundled defaults include example configs. For production, point to your own:
{
services.faucet = {
enable = true;
configFile = ./config/faucet.yaml;
ryuConfig = ./config/ryu.conf;
};
services.gauge = {
enable = true;
configFile = ./config/gauge.yaml;
};
}nix develop # enter dev shell
setup-local-source # copy upstream source for editing
build-local # build from local copy
nix build # build from pinned flake inputApache 2.0 — matches upstream Faucet SDN.