From c5119b4882b08b07865e9feb900418ff639e11e3 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 1 Jan 2022 12:40:13 +0000 Subject: [PATCH] ops/nixos: enable HTTP gateway if Tailscale is configured --- ops/nixos/lib/common.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ops/nixos/lib/common.nix b/ops/nixos/lib/common.nix index 234be40aa8..4d753e83a2 100644 --- a/ops/nixos/lib/common.nix +++ b/ops/nixos/lib/common.nix @@ -251,5 +251,10 @@ in }; services.fwupd.enable = true; + services.journald.enableHttpGateway = config.my.ip.tailscale != null; + systemd.sockets.systemd-journal-gatewayd.socketConfig = lib.optionalAttrs (config.my.ip.tailscale != null) { + ListenStream = [ "" "${config.my.ip.tailscale}:19531" "127.0.0.1:19531" "[::1]:19531" ]; + FreeBind = true; + }; }; }