nixos/gvpe: add types

This commit is contained in:
Scriptkiddi 2021-01-26 21:08:47 +01:00 committed by Cole Helbling
parent 1752a175e8
commit 103ea99b99

View file

@ -3,7 +3,7 @@
{config, pkgs, lib, ...}: {config, pkgs, lib, ...}:
let let
inherit (lib) mkOption mkIf; inherit (lib) mkOption mkIf types;
cfg = config.services.gvpe; cfg = config.services.gvpe;
@ -46,12 +46,14 @@ in
nodename = mkOption { nodename = mkOption {
default = null; default = null;
type = types.nullOr types.str;
description ='' description =''
GVPE node name GVPE node name
''; '';
}; };
configText = mkOption { configText = mkOption {
default = null; default = null;
type = types.nullOr types.lines;
example = '' example = ''
tcp-port = 655 tcp-port = 655
udp-port = 655 udp-port = 655
@ -72,6 +74,7 @@ in
}; };
configFile = mkOption { configFile = mkOption {
default = null; default = null;
type = types.nullOr types.path;
example = "/root/my-gvpe-conf"; example = "/root/my-gvpe-conf";
description = '' description = ''
GVPE config file, if already present GVPE config file, if already present
@ -79,12 +82,14 @@ in
}; };
ipAddress = mkOption { ipAddress = mkOption {
default = null; default = null;
type = types.nullOr types.str;
description = '' description = ''
IP address to assign to GVPE interface IP address to assign to GVPE interface
''; '';
}; };
subnet = mkOption { subnet = mkOption {
default = null; default = null;
type = types.nullOr types.str;
example = "10.0.0.0/8"; example = "10.0.0.0/8";
description = '' description = ''
IP subnet assigned to GVPE network IP subnet assigned to GVPE network
@ -92,6 +97,7 @@ in
}; };
customIFSetup = mkOption { customIFSetup = mkOption {
default = ""; default = "";
type = types.lines;
description = '' description = ''
Additional commands to apply in ifup script Additional commands to apply in ifup script
''; '';