summaryrefslogtreecommitdiffstats
path: root/lib/types.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-12-12 17:53:38 +0100
committermakefu <github@syntax-fehler.de>2018-12-12 17:53:38 +0100
commit97aaf34c3311291ac47967ac1313e2d955b8228a (patch)
treed119d7ae674863f645e840e14bde0fbfe6f6a16c /lib/types.nix
parent2e18ee84f02c0d7abcf936b1d39c42ab8e75825c (diff)
parent25cf61f6a74b69656d15f52021f25a6c2e4068e6 (diff)
Merge remote-tracking branch 'lass/master' into HEAD
Diffstat (limited to 'lib/types.nix')
-rw-r--r--lib/types.nix26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix
index 016853300..17c1688fa 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;
}