feat: move cloudflare tunnel config to network.nix

This commit is contained in:
Guz
2025-04-04 20:15:09 -03:00
parent a2f074a3b5
commit 5db75d337f
3 changed files with 24 additions and 22 deletions

View File

@@ -1,21 +0,0 @@
{config, ...}: let
secrets = config.spacestation-secrets.lesser;
in {
imports = [];
virtualisation.oci-containers.containers.cloudflare-funnel = {
image = "cloudflare/cloudflared:latest";
autoStart = true;
extraOptions = [
"--network=host"
];
cmd = [
"tunnel"
"--no-autoupdate"
"run"
"--token"
secrets.capytal.cloudflare-funnel
];
environment = {};
};
}

View File

@@ -1,8 +1,9 @@
{inputs, ...}: { {inputs, ...}: {
imports = [ imports = [
./caddy.nix
./cloudflare.nix ./cloudflare.nix
./network.nix
./websites.nix ./websites.nix
./forgejo ./forgejo
./garage.nix ./garage.nix
./sqld.nix ./sqld.nix

View File

@@ -17,4 +17,26 @@
''; '';
}; };
}; };
virtualisation.oci-containers.containers.cloudflare-funnel = let
secrets = config.spacestation-secrets.lesser;
in {
image = "cloudflare/cloudflared:latest";
autoStart = true;
extraOptions = [
"--network=host"
];
cmd = [
"tunnel"
"--no-autoupdate"
"run"
"--token"
secrets.capytal.cloudflare-funnel
];
environment = {};
};
networking.firewall.allowedTCPPorts = [
80
433
];
} }