feat(tailscale): Add base domain as search domain

Doing this will allow access to other people's servers with
"foo.username" rather than "foo.username.<base>".

The likelihood of this causing trouble is minimal, but we may prefer to
be careful to avoid allowing names that might conflict with existing TLDs

Change-Id: I7d73a037bd999cfb94556a63d97387275e582195
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/739
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/nixos/clicks/services/headscale/README.md b/modules/nixos/clicks/services/headscale/README.md
index fd5cc1a..93bbed1 100644
--- a/modules/nixos/clicks/services/headscale/README.md
+++ b/modules/nixos/clicks/services/headscale/README.md
@@ -17,7 +17,8 @@
 ```
 
 The `url` is both the address you'll use to access your headscale server, as well as the base address that devices are
-suffixed with (e.g. a device called `albatross` owned by `minion` would become `albatross.minion.<url>`)
+suffixed with (e.g. a device called `albatross` owned by `minion` would become `albatross.minion.<url>`). It's also
+added as a search domain, so you could access "albatross" with "albatross.minion".
 
 ---
 
diff --git a/modules/nixos/clicks/services/headscale/default.nix b/modules/nixos/clicks/services/headscale/default.nix
index 84be617..68ed4fc 100644
--- a/modules/nixos/clicks/services/headscale/default.nix
+++ b/modules/nixos/clicks/services/headscale/default.nix
@@ -93,6 +93,7 @@
           "1.1.1.1"
           "1.0.0.1"
         ];
+        domains = [ cfg.url ];
         override_local_dns = true;
         base_domain = cfg.url;
       };