aboutsummaryrefslogtreecommitdiff
path: root/modules/wireguard/options.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-01-18 08:07:27 -0600
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-01-18 08:07:27 -0600
commited2550a41c8429a1d2fe897deb878717c2ebc3d1 (patch)
tree43a4ab6d02cb8dd0308a9fd8628bb04ee7f6ccec /modules/wireguard/options.nix
parent9bd9efe8b26ba34e0cbba3e281749a4e262558e0 (diff)
initial wireguard configuration
Diffstat (limited to 'modules/wireguard/options.nix')
-rw-r--r--modules/wireguard/options.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/wireguard/options.nix b/modules/wireguard/options.nix
new file mode 100644
index 0000000..8e5398e
--- /dev/null
+++ b/modules/wireguard/options.nix
@@ -0,0 +1,40 @@
+{lib, ...}: let
+ inherit (lib) mkOption mkEnableOption;
+in {
+ options = {
+ collinux.wireguard = {
+ enable = mkEnableOption "wireguard";
+ ip = mkOption {
+ type = lib.types.str;
+ description = "host's ip address on the wireguard network (with cidr)";
+ };
+ gateway = mkOption {
+ type = lib.types.str;
+ description = "host's gateway";
+ };
+ privateKeyFile = mkOption {
+ type = lib.types.str;
+ description = "path to local private key file";
+ example = "/run/secretd.d/wireguard-key";
+ };
+ peers = mkOption {
+ type = lib.types.attrsOf (lib.types.submodule {
+ options = {
+ publicKey = mkOption {
+ type = lib.types.str;
+ description = "peer's public key";
+ };
+ ip = mkOption {
+ type = lib.types.str;
+ description = "peer's IP address";
+ };
+ endpoint = mkOption {
+ type = lib.types.str;
+ description = "peer's endpoint";
+ };
+ };
+ });
+ };
+ };
+ };
+}