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
commitd49adb05b90f41e4bb2614a0ca8848af72bd27e9 (patch)
tree68e2958a2fb6fd9bff1c6250a0a5dcdf7bd0c7d2 /lib/types.nix
parent48e1828a914159b7377d42ac7c34ef303a9b836f (diff)
parentca73242cda966672b314a7378652bf8294a512e5 (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 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;
}