From 8f53937c40a88fc59c02a993315c29d32ff2d09c Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 5 Dec 2018 16:52:32 +0100 Subject: types host: cores can also be 0 --- lib/types.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/types.nix') diff --git a/lib/types.nix b/lib/types.nix index 01685330..41e75154 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -19,7 +19,7 @@ rec { default = config._module.args.name; }; cores = mkOption { - type = positive; + type = uint; }; nets = mkOption { type = attrsOf net; -- cgit v1.2.3 From 149b7f49ec23eaeb9236d1b9b85d7a6bd1b611ad Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 9 Dec 2018 16:50:58 +0100 Subject: lib types nets: add wireguard --- lib/types.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib/types.nix') diff --git a/lib/types.nix b/lib/types.nix index 41e75154..17c1688f 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -192,6 +192,28 @@ rec { })); default = null; }; + wireguard = mkOption { + type = nullOr (submodule ({ config, ... }: { + options = { + port = mkOption { + type = int; + description = "tinc port to use to connect to host"; + default = 51820; + }; + pubkey = mkOption { + type = wireguard-pubkey; + }; + subnets = mkOption { + type = listOf cidr; + description = '' + wireguard subnets, + this defines how routing behaves for hosts that can't reach each other. + ''; + default = []; + }; + }; + })); + }; }; }); @@ -548,4 +570,6 @@ rec { check = filename.check; merge = mergeOneOption; }; + + wireguard-pubkey = str; } -- cgit v1.2.3