fix: missing opened firewall port for proxy-home

This commit is contained in:
oddlama 2024-05-20 13:20:54 +02:00
parent 20a5e1e66a
commit 1b1a19e377
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 13 additions and 3 deletions

View file

@ -107,7 +107,7 @@ in {
PAPERLESS_URL = "https://${paperlessDomain}";
PAPERLESS_ALLOWED_HOSTS = paperlessDomain;
PAPERLESS_CORS_ALLOWED_HOSTS = "https://${paperlessDomain}";
PAPERLESS_TRUSTED_PROXIES = lib.concatStringSep "," [
PAPERLESS_TRUSTED_PROXIES = lib.concatStringsSep "," [
sentinelCfg.wireguard.proxy-sentinel.ipv4
wardWebProxyCfg.wireguard.proxy-home.ipv4
];

View file

@ -5,6 +5,7 @@
...
}: let
sentinelCfg = nodes.sentinel.config;
wardWebProxyCfg = nodes.ward-web-proxy.config;
in {
meta.promtail = {
enable = true;
@ -12,7 +13,12 @@ in {
};
# Connect safely via wireguard to skip http authentication
networking.hosts.${sentinelCfg.wireguard.proxy-sentinel.ipv4} = [sentinelCfg.networking.providedDomains.influxdb];
networking.hosts.${
if config.wireguard ? proxy-home
then wardWebProxyCfg.wireguard.proxy-home.ipv4
else sentinelCfg.wireguard.proxy-sentinel.ipv4
} = [sentinelCfg.networking.providedDomains.influxdb];
meta.telegraf = lib.mkIf (!config.boot.isContainer) {
enable = true;
scrapeSensors = false;

View file

@ -1,7 +1,10 @@
{config, ...}: let
inherit (config.repo.secrets.local) acme;
in {
wireguard.proxy-home.client.via = "ward";
wireguard.proxy-home = {
client.via = "ward";
firewallRuleForAll.allowedTCPPorts = [80 443];
};
age.secrets.acme-cloudflare-dns-token = {
rekeyFile = config.node.secretsDir + "/acme-cloudflare-dns-token.age";

View file

@ -17,6 +17,7 @@
in {
options.meta.promtail = {
enable = mkEnableOption "promtail to push logs to a loki instance.";
# TODO: FIXME: this should not be named proxy. get domain from globals and name this secretAggregatorNode or smth.
proxy = mkOption {
type = types.str;
description = "The node name of the proxy server which provides the https loki api endpoint.";