From a47dd0bfacb6e82de7fa892de48de6155bec1ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Sun, 26 Jan 2025 22:08:46 +0100 Subject: [PATCH] feat(module): add option for setting --ip-type This makes it easy to set the server to ipv4-only mode. --- flake-modules/module.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/flake-modules/module.nix b/flake-modules/module.nix index fc52da7..e70ae35 100644 --- a/flake-modules/module.nix +++ b/flake-modules/module.nix @@ -48,6 +48,16 @@ let type = types.port; default = 5353; }; + allowedIPVersion = mkOption { + description = ''The allowed IP versions to accept updates from.''; + type = types.enum [ + "both" + "ipv4-only" + "ipv6-only" + ]; + default = "both"; + example = "ipv4-only"; + }; passwordFile = mkOption { description = '' The file where the password is stored. @@ -126,6 +136,8 @@ let cfg.passwordFile "--address" cfg.bindIp + "--ip-type" + cfg.allowedIPVersion "--port" (builtins.toString cfg.bindPort) "--ttl"