Modify caddy
This commit is contained in:
@@ -101,6 +101,8 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
user = defaultUser.userName;
|
user = defaultUser.userName;
|
||||||
dataDir = "/home/${defaultUser.userName}";
|
dataDir = "/home/${defaultUser.userName}";
|
||||||
|
overrideDevices = false;
|
||||||
|
overrideFolders = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
tailscale = {
|
tailscale = {
|
||||||
|
|||||||
73
modules/caddy/Caddyfile
Normal file
73
modules/caddy/Caddyfile
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
log {
|
||||||
|
level ERROR
|
||||||
|
}
|
||||||
|
admin off
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix.broccoli.town {
|
||||||
|
reverse_proxy /_matrix/* http://localhost:8008
|
||||||
|
reverse_proxy /_synapse/client/* http://localhost:8008
|
||||||
|
}
|
||||||
|
|
||||||
|
broccoli.town:8448 {
|
||||||
|
reverse_proxy http://localhost:8008
|
||||||
|
}
|
||||||
|
|
||||||
|
broccoli.town {
|
||||||
|
header /.well-known/* "Access-Control-Allow-Origin" "*"
|
||||||
|
respond /.well-known/matrix/client "{\"m.homeserver\": {\"base_url\": \"https://broccoli.town\"}}"
|
||||||
|
|
||||||
|
reverse_proxy /_matrix/* http://localhost:8008
|
||||||
|
reverse_proxy /_synapse/client/* http://localhost:8008
|
||||||
|
|
||||||
|
redir / https://chat.broccoli.town
|
||||||
|
}
|
||||||
|
|
||||||
|
chat.broccoli.town {
|
||||||
|
header {
|
||||||
|
X-Frame-Options "SAMEORIGIN"
|
||||||
|
X-XSS-Protection "1; mode=block"
|
||||||
|
X-Content-Type-Options "nosniff"
|
||||||
|
X-Robots-Tag "noindex, noarchive, nofollow"
|
||||||
|
}
|
||||||
|
root * @element@
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
danielpatterson.dev {
|
||||||
|
header {
|
||||||
|
proof proven.lol/de4a14
|
||||||
|
}
|
||||||
|
root * /srv/site/danielpatterson.dev
|
||||||
|
encode zstd gzip
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
movies.danielpatterson.dev {
|
||||||
|
reverse_proxy localhost:8096
|
||||||
|
}
|
||||||
|
|
||||||
|
elixir.danielpatterson.dev {
|
||||||
|
reverse_proxy localhost:8080
|
||||||
|
}
|
||||||
|
|
||||||
|
git.broccoli.town {
|
||||||
|
reverse_proxy localhost:3030
|
||||||
|
}
|
||||||
|
|
||||||
|
http://bigding:8384 {
|
||||||
|
reverse_proxy localhost:8387
|
||||||
|
}
|
||||||
|
|
||||||
|
bigding.squirrel-clownfish.ts.net {
|
||||||
|
tls {
|
||||||
|
get_certificate tailscale
|
||||||
|
}
|
||||||
|
reverse_proxy localhost:9091
|
||||||
|
}
|
||||||
|
|
||||||
|
http://bigding {
|
||||||
|
reverse_proxy /transmission localhost:9091
|
||||||
|
reverse_proxy /transmission/* localhost:9091
|
||||||
|
}
|
||||||
@@ -23,103 +23,14 @@
|
|||||||
}
|
}
|
||||||
// catppuccin;
|
// catppuccin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = pkgs.substituteAll {
|
||||||
|
inherit element;
|
||||||
|
src = ./Caddyfile;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts = {
|
configFile = config;
|
||||||
"http://metrics.town" = {
|
adapter = "caddyfile";
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy http://localhost:3000
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"matrix.broccoli.town" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy /_matrix/* http://localhost:8008
|
|
||||||
reverse_proxy /_synapse/client/* http://localhost:8008
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"broccoli.town:8448" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy http://localhost:8008
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"broccoli.town" = {
|
|
||||||
extraConfig = ''
|
|
||||||
header /.well-known/* "Access-Control-Allow-Origin" "*"
|
|
||||||
respond /.well-known/matrix/client "{\"m.homeserver\": {\"base_url\": \"https://broccoli.town\"}}"
|
|
||||||
|
|
||||||
reverse_proxy /_matrix/* http://localhost:8008
|
|
||||||
reverse_proxy /_synapse/client/* http://localhost:8008
|
|
||||||
|
|
||||||
redir / https://chat.broccoli.town
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"chat.broccoli.town" = {
|
|
||||||
extraConfig = ''
|
|
||||||
header {
|
|
||||||
X-Frame-Options "SAMEORIGIN"
|
|
||||||
X-XSS-Protection "1; mode=block"
|
|
||||||
X-Content-Type-Options "nosniff"
|
|
||||||
X-Robots-Tag "noindex, noarchive, nofollow"
|
|
||||||
}
|
|
||||||
root * ${element}
|
|
||||||
file_server
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"danielpatterson.dev" = {
|
|
||||||
extraConfig = ''
|
|
||||||
header {
|
|
||||||
proof proven.lol/de4a14
|
|
||||||
}
|
|
||||||
root * /srv/site/danielpatterson.dev
|
|
||||||
encode zstd gzip
|
|
||||||
file_server
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"movies.danielpatterson.dev" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy localhost:8096
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"elixir.danielpatterson.dev" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy localhost:8080
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"git.broccoli.town" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy localhost:3030
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"http://bigding:8384" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy localhost:8387
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"bigding.squirrel-clownfish.ts.net" = {
|
|
||||||
extraConfig = ''
|
|
||||||
tls {
|
|
||||||
get_certificate tailscale
|
|
||||||
}
|
|
||||||
reverse_proxy localhost:9091
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"http://bigding" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy /transmission localhost:9091
|
|
||||||
reverse_proxy /transmission/* localhost:9091
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,12 @@
|
|||||||
}: {
|
}: {
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {};
|
settings = {
|
||||||
|
server = {
|
||||||
|
http_addr = "localhost";
|
||||||
|
http_port = 3033;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
|
|||||||
Reference in New Issue
Block a user