Commit 0d771089 authored by x123's avatar x123
Browse files

nixos/headscale: dns split & extra_records options

parent ebc94f85
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
@@ -329,6 +329,49 @@ in
                };
              };

              split = lib.mkOption {
                type = lib.types.attrsOf (lib.types.listOf lib.types.str);
                default = { };
                description = ''
                  Split DNS configuration (map of domains and which DNS server to use for each).
                  See <https://tailscale.com/kb/1054/dns/>.
                '';
                example = {
                  "foo.bar.com" = [ "1.1.1.1" ];
                };
              };

              extra_records = lib.mkOption {
                type = lib.types.listOf (
                  lib.types.submodule {
                    options = {
                      name = lib.mkOption {
                        type = lib.types.str;
                        description = "DNS record name.";
                        example = "grafana.tailnet.example.com";
                      };
                      type = lib.mkOption {
                        type = lib.types.enum [
                          "A"
                          "AAAA"
                        ];
                        description = "DNS record type.";
                        example = "A";
                      };
                      value = lib.mkOption {
                        type = lib.types.str;
                        description = "DNS record value (IP address).";
                        example = "100.64.0.3";
                      };
                    };
                  }
                );
                default = [ ];
                description = ''
                  Extra DNS records to expose to clients.
                '';
              };

              search_domains = lib.mkOption {
                type = lib.types.listOf lib.types.str;
                default = [ ];