diff --git a/docs/src/helpers.md b/docs/src/helpers.md index 983395e..36896e1 100644 --- a/docs/src/helpers.md +++ b/docs/src/helpers.md @@ -80,3 +80,8 @@ nodes.router = mkSwitch "Router" { connections.wan1 = mkConnection "host1" "wan"; }; ``` + +## mkDevice + +Exactly the same as `mkSwitch`, but sets the device type to `device` instead of `switch`, +which has no icon to the right by default. diff --git a/topology/helpers.nix b/topology/helpers.nix index 2709274..23d0031 100644 --- a/topology/helpers.nix +++ b/topology/helpers.nix @@ -61,4 +61,10 @@ in rec { // { deviceType = "router"; }; + + mkDevice = name: args: + mkDevice name args + // { + deviceType = "device"; + }; }