Compare commits
No commits in common. "39111afeaea5927fb32f9bf85c5b639c853f57e2" and "61b1399131045afb98f4f5f397b9461fd5b29772" have entirely different histories.
39111afeae
...
61b1399131
16 changed files with 5 additions and 111 deletions
|
@ -21,9 +21,4 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."dns.cything.io".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8082
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -31,9 +31,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."cache.cything.io".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8090
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -10,9 +10,4 @@
|
|||
allow_check_for_updates = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."chat.cything.io".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8448
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -183,13 +183,11 @@
|
|||
programs.gnupg.agent.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
my.caddy.enable = true;
|
||||
services.caddy.virtualHosts."cy7.sh" = {
|
||||
serverAliases = [ "www.cy7.sh" ];
|
||||
extraConfig = ''
|
||||
import common
|
||||
redir https://cything.io temporary
|
||||
'';
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
configFile = ./Caddyfile;
|
||||
environmentFile = config.sops.secrets."caddy/env".path;
|
||||
logFormat = lib.mkForce "level INFO";
|
||||
};
|
||||
|
||||
# container stuff
|
||||
|
|
|
@ -7,9 +7,4 @@
|
|||
port = 8112;
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."t.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8112
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -25,9 +25,4 @@
|
|||
${pkgs.podman}/bin/podman network create element-net
|
||||
'';
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."element.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8089
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -30,20 +30,4 @@
|
|||
name = "git";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."git.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:3000
|
||||
'';
|
||||
services.caddy.virtualHosts."git.cything.io".extraConfig = ''
|
||||
import common
|
||||
|
||||
# wrap in route so things are evaluated in the order written
|
||||
route {
|
||||
# rewrite gitlab URIs to make it work with forgejo
|
||||
uri path_regexp /-/ /
|
||||
uri replace /blob/ /src/
|
||||
redir https://git.cy7.sh{uri} permanent
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -16,9 +16,4 @@
|
|||
};
|
||||
environmentFile = config.sops.secrets."garage/env".path;
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."s3.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:3900
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -31,9 +31,4 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."grafana.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8088
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -16,9 +16,4 @@
|
|||
protocolUseSSL = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."pad.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8085
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -95,9 +95,4 @@ in
|
|||
${pkgs.podman}/bin/podman network create immich-net
|
||||
'';
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."photos.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:2283
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -9,9 +9,4 @@
|
|||
FORCE_REFRESH_INTERVAL = 0; # don't rate limit me
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."rss.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8080
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -10,9 +10,4 @@
|
|||
REDLIB_ROBOTS_DISABLE_INDEXING = "on";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."red.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8087
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -10,9 +10,4 @@
|
|||
DATABASE_URL = "postgresql://vaultwarden:vaultwarden@127.0.0.1:5432/vaultwarden";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."pass.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:8081
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.caddy;
|
||||
in
|
||||
{
|
||||
options.my.caddy = {
|
||||
enable = lib.mkEnableOption "caddy reverse proxy";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
logFormat = lib.mkForce "level INFO";
|
||||
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
extraConfig = ''
|
||||
(common) {
|
||||
encode zstd gzip
|
||||
header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
{
|
||||
imports = [
|
||||
./backup.nix
|
||||
./caddy.nix
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue