feat: added new site stuff

This commit is contained in:
Nick 2024-12-08 22:53:40 -06:00
parent 0fd351c9cb
commit ff826c785a
7 changed files with 61 additions and 2 deletions

View file

@ -0,0 +1,24 @@
{instancesFunctions}: let
inherit (instancesFunctions) domain3 servicePath sslPath sopsPath;
upRootNutritionLabel = "upRootNutrition";
upRootNutritionName = "uprootnutrition";
in {
label = upRootNutritionLabel;
name = upRootNutritionName;
email = {
address0 = "nick@${domain3}";
};
sops = {
path0 = "${sopsPath}/${upRootNutritionName}";
};
paths = {
path0 = "${servicePath}/${upRootNutritionLabel}";
path1 = "";
path2 = "";
};
ssl = {
cert = "${sslPath}/${domain3}/fullchain.pem";
key = "${sslPath}/${domain3}/key.pem";
};
}

View file

@ -1,10 +1,11 @@
{instancesFunctions}: let
inherit (instancesFunctions) domain0 domain1 domain2;
inherit (instancesFunctions) domain0 domain1 domain2 domain3;
in {
domains = {
url0 = domain0;
url1 = domain1;
url2 = domain2;
url3 = domain3;
};
dns = {
provider0 = "namecheap";

View file

@ -7,6 +7,7 @@ let
domain0 = "cloudbert.fun";
domain1 = "the-nutrivore.social";
domain2 = "the-nutrivore.com";
domain3 = "uprootnutrition.com";
servicePath = "/mnt/media/NAS1";
sopsPath = "/var/lib/secrets";
sslPath = "/var/lib/acme";

View file

@ -2,6 +2,9 @@
home.packages = builtins.attrValues {
inherit
(pkgs)
# Browsers
google-chrome
# Messaging
discord

View file

@ -19,6 +19,6 @@
"editor.multiCursorLimit" = 700000;
"elmLS.disableElmLSDiagnostics" = true;
"elmLS.elmReviewDiagnostics" = "warning";
"editor.wordWrap" = true;
"editor.wordWrap" = "on";
};
}

View file

@ -8,6 +8,7 @@
inherit (flake.config.services) instances;
domain0 = instances.web.domains.url0;
domain1 = instances.web.domains.url1;
domain3 = instances.web.domains.url3;
dns = instances.web.dns.provider0;
instanceName = service: (instances.${service}.subdomain);
dnsConfig = {
@ -53,6 +54,7 @@ in {
[
domain0
domain1
domain3
])
);
};

View file

@ -0,0 +1,28 @@
{
flake,
config,
...
}: let
inherit (flake.config.machines.devices) server;
inherit (flake.config.services.instances) upRootNutrition web;
service = upRootNutrition;
localhost = web.localhost.address0;
host = web.domains.url3;
in {
services = {
caddy = {
virtualHosts = {
"${host}" = {
extraConfig = ''
redir /.well-known/carddav /remote.php/dav/ 301
redir /.well-known/caldav /remote.php/dav/ 301
reverse_proxy ${localhost}:${toString service.ports.port1}
tls ${service.ssl.cert} ${service.ssl.key}
'';
};
};
};
};
}