1
0
mirror of http://code.capytal.cc/dot013/spacestation.git synced 2026-01-15 23:46:13 -03:00

refactor: move caddy and cloudflare to common folder

This commit is contained in:
Guz
2025-09-13 22:08:55 -03:00
parent 938623ca5e
commit 91dc80922e
4 changed files with 25 additions and 21 deletions

View File

@@ -4,25 +4,4 @@
./forgejo.nix
./websites.nix
];
services.caddy.enable = true;
virtualisation.oci-containers.containers.cloudflare-tunnel = {
image = "cloudflare/cloudflared:latest";
autoStart = true;
extraOptions = [
"--network=host"
];
cmd = [
"tunnel"
"--no-autoupdate"
"run"
];
environmentFiles = [
config.sops.secrets."cloudflared/tunnel-env".path
];
};
# Caddy Ports
networking.firewall.allowedTCPPorts = [80 433];
}

6
common/caddy.nix Normal file
View File

@@ -0,0 +1,6 @@
{...}: {
services.caddy.enable = true;
# Caddy Ports
networking.firewall.allowedTCPPorts = [80 433];
}

17
common/cloudflare.nix Normal file
View File

@@ -0,0 +1,17 @@
{config, ...}: {
virtualisation.oci-containers.containers.cloudflare-tunnel = {
image = "cloudflare/cloudflared:latest";
autoStart = true;
extraOptions = [
"--network=host"
];
cmd = [
"tunnel"
"--no-autoupdate"
"run"
];
environmentFiles = [
config.sops.secrets."cloudflared/tunnel-env".path
];
};
}

View File

@@ -1,5 +1,7 @@
{...}: {
imports = [
./tailscale.nix
./caddy.nix
./cloudflare.nix
];
}