mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
feat: caddy test
This commit is contained in:
parent
8b359bfb9f
commit
639a0a24e5
3 changed files with 9 additions and 22 deletions
|
@ -17,6 +17,9 @@ in {
|
||||||
path1 = "";
|
path1 = "";
|
||||||
path2 = "";
|
path2 = "";
|
||||||
};
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 1234;
|
||||||
|
};
|
||||||
ssl = {
|
ssl = {
|
||||||
cert = "${sslPath}/${domain3}/fullchain.pem";
|
cert = "${sslPath}/${domain3}/fullchain.pem";
|
||||||
key = "${sslPath}/${domain3}/key.pem";
|
key = "${sslPath}/${domain3}/key.pem";
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
inherit (flake.config.machines.devices) server;
|
inherit (flake.config.machines.devices) server;
|
||||||
inherit (flake.config.services.instances) mastodon web;
|
inherit (flake.config.services.instances) mastodon web;
|
||||||
service = mastodon;
|
service = mastodon;
|
||||||
host = web.domains.url1;
|
host = web.domains.url3;
|
||||||
localhost = web.localhost.address0;
|
localhost = web.localhost.address0;
|
||||||
in {
|
in {
|
||||||
# If you need to start fresh for some reason, run these to create the new Admin account:
|
# If you need to start fresh for some reason, run these to create the new Admin account:
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{flake, ...}: let
|
||||||
flake,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (flake.config.machines.devices) server;
|
|
||||||
inherit (flake.config.services.instances) upRootNutrition web;
|
inherit (flake.config.services.instances) upRootNutrition web;
|
||||||
service = upRootNutrition;
|
service = upRootNutrition;
|
||||||
localhost = web.localhost.address0;
|
localhost = web.localhost.address0;
|
||||||
|
@ -14,21 +9,10 @@ in {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"${host}" = {
|
"${host}" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
redir /.well-known/carddav /remote.php/dav/ 301
|
||||||
|
redir /.well-known/caldav /remote.php/dav/ 301
|
||||||
|
|
||||||
root * /var/lib/website
|
reverse_proxy ${localhost}:${toString service.ports.port0}
|
||||||
|
|
||||||
file_server
|
|
||||||
|
|
||||||
try_files {path} /index.html
|
|
||||||
encode gzip
|
|
||||||
|
|
||||||
header {
|
|
||||||
# Disable FLoC tracking
|
|
||||||
Permissions-Policy interest-cohort=()
|
|
||||||
# Enable HSTS
|
|
||||||
Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
|
||||||
# Prevent MIME-type sniffing
|
|
||||||
X-Content-Type-Options nosniff
|
|
||||||
|
|
||||||
tls ${service.ssl.cert} ${service.ssl.key}
|
tls ${service.ssl.cert} ${service.ssl.key}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue