diff options
author | jeschli <jeschli@gmail.com> | 2018-12-16 20:28:28 +0100 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-12-16 20:28:28 +0100 |
commit | fc0939ecf9263a778d44e1e2afb9cb118eaaa15a (patch) | |
tree | 118cea2301540ea623c9042138a950b6cc480027 /lib/types.nix | |
parent | 8ecc3901fd8bbd6172e6c32325aa3bc566c388de (diff) | |
parent | 6cf1d25e454141eda7fd59f1a9cc4564250d13ad (diff) |
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix index 0168533..17c1688 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; @@ -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; } |