all repos — nixfiles @ 2412a0ba69c6c0a32d740f171ea5444461747b59

System and user configuration, managed by nix and home-manager

r5: run an instance of searchix

Alin
commit

2412a0ba69c6c0a32d740f171ea5444461747b59

parent

9bdcf14887d2188054060e1729b97d093dea2bfa

1 file changed, 29 insertions(+), 0 deletions(-)

changed files
M system/hosts/r5.nix → system/hosts/r5.nix
@@ -1,4 +1,5 @@
{ + config, pkgs, lib, ...
@@ -21,6 +22,7 @@ ../roles/exit-node.nix
../roles/syncthing.nix ../roles/home-automation.nix ../roles/tailscale-subnet-router.nix + ../settings/services/searchix.nix ../settings/hardware/usb-serial-tty.nix ]; age.secrets = {
@@ -40,6 +42,33 @@ # see ../roles/router.nix for remaining settings
nat = { externalInterface = wan; internalInterfaces = [ bridge ]; + }; + }; + + services.dnsmasq.settings.cname = [ + "searchix.${domain},${hostName}.${domain}" + ]; + services.searchix.settings.web = { + listenAddress = "::"; + baseURL = "https://searchix.${domain}/"; + }; + services.caddy.virtualHosts = { + "searchix.${domain}" = { + extraConfig = '' + tls { + issuer internal { + ca home + } + } + encode + reverse_proxy localhost:${toString config.services.searchix.settings.web.port} { + health_uri /health + health_status 2xx + health_interval 10s + health_timeout 1s + health_fails 2 + } + ''; }; };