This commit is contained in:
parent
49729903cd
commit
17be52b377
15 changed files with 136 additions and 107 deletions
|
|
@ -53,6 +53,5 @@ in
|
|||
|
||||
imports = [
|
||||
./oliverdavies.uk
|
||||
./ponthirtaekwondo.co.uk.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
let
|
||||
name = "ponthirtaekwondo.co.uk";
|
||||
ports = config.homelab.ports;
|
||||
port = ports.nginx.ponthir-taekwondo;
|
||||
in
|
||||
{
|
||||
security.acme.certs = {
|
||||
"ponthirtaekwondo.co.uk" = {
|
||||
domain = "ponthirtaekwondo.co.uk";
|
||||
dnsProvider = "cloudflare";
|
||||
email = "oliver@oliverdavies.uk";
|
||||
environmentFile = config.age.secrets.cloudflare.path;
|
||||
webroot = null;
|
||||
|
||||
extraDomainNames = [
|
||||
"www.ponthirtaekwondo.co.uk"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
nginx.virtualHosts = {
|
||||
"www.${name}" = {
|
||||
root = "/var/www/vhosts/${name}";
|
||||
|
||||
listen = [
|
||||
{
|
||||
inherit port;
|
||||
|
||||
addr = "localhost";
|
||||
}
|
||||
];
|
||||
|
||||
locations."/".tryFiles = "$uri $uri.html $uri/index.html =404";
|
||||
|
||||
extraConfig = ''
|
||||
port_in_redirect off;
|
||||
|
||||
# Remove trailing slashes.
|
||||
rewrite ^/(.*)/$ /$1 permanent;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
cloudflared.tunnels."e1514105-327f-4984-974e-e2fbaca76466".ingress = {
|
||||
"www.ponthirtaekwondo.co.uk" = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue