From cd017d1b617c4ee3c0e823b8681a14ec11f768b6 Mon Sep 17 00:00:00 2001 From: sefidel Date: Tue, 20 Feb 2024 21:45:25 +0900 Subject: fix(modules/blocky): fix blocking status buttons --- modules/services/blocky/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/services/blocky/default.nix b/modules/services/blocky/default.nix index 327670e..f68ba71 100644 --- a/modules/services/blocky/default.nix +++ b/modules/services/blocky/default.nix @@ -7,6 +7,8 @@ in { options.modules.services.blocky = { enable = mkEnableOption ""; + + realHost = mkOption { type = types.str; default = "127.0.0.1"; }; }; config = mkIf cfg.enable { @@ -17,7 +19,7 @@ in # Safety: NixOS firewall should block public access to 53. # Only machines connected to the tailscale is able to reach the service. dns = 53; - http = "127.0.0.1:4000"; + http = 4000; }; upstream.default = [ @@ -106,7 +108,7 @@ in }; environment.etc."grafana-dashboards/blocky_rev3.json" = { - source = ./grafana_blocky_rev3.json; + text = replaceStrings ["\${VAR_BLOCKY_URL}"] ["https://${cfg.realHost}"] (builtins.readFile ./grafana_blocky_rev3.json); group = "grafana"; user = "grafana"; }; -- cgit 1.4.1