mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-10 13:54:38 -05:00
feat: added new site stuff
This commit is contained in:
parent
0fd351c9cb
commit
ff826c785a
7 changed files with 61 additions and 2 deletions
24
config/instances/config/upRootNutrition.nix
Executable file
24
config/instances/config/upRootNutrition.nix
Executable 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";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,10 +1,11 @@
|
||||||
{instancesFunctions}: let
|
{instancesFunctions}: let
|
||||||
inherit (instancesFunctions) domain0 domain1 domain2;
|
inherit (instancesFunctions) domain0 domain1 domain2 domain3;
|
||||||
in {
|
in {
|
||||||
domains = {
|
domains = {
|
||||||
url0 = domain0;
|
url0 = domain0;
|
||||||
url1 = domain1;
|
url1 = domain1;
|
||||||
url2 = domain2;
|
url2 = domain2;
|
||||||
|
url3 = domain3;
|
||||||
};
|
};
|
||||||
dns = {
|
dns = {
|
||||||
provider0 = "namecheap";
|
provider0 = "namecheap";
|
||||||
|
|
|
@ -7,6 +7,7 @@ let
|
||||||
domain0 = "cloudbert.fun";
|
domain0 = "cloudbert.fun";
|
||||||
domain1 = "the-nutrivore.social";
|
domain1 = "the-nutrivore.social";
|
||||||
domain2 = "the-nutrivore.com";
|
domain2 = "the-nutrivore.com";
|
||||||
|
domain3 = "uprootnutrition.com";
|
||||||
servicePath = "/mnt/media/NAS1";
|
servicePath = "/mnt/media/NAS1";
|
||||||
sopsPath = "/var/lib/secrets";
|
sopsPath = "/var/lib/secrets";
|
||||||
sslPath = "/var/lib/acme";
|
sslPath = "/var/lib/acme";
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
home.packages = builtins.attrValues {
|
home.packages = builtins.attrValues {
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
|
# Browsers
|
||||||
|
|
||||||
|
google-chrome
|
||||||
# Messaging
|
# Messaging
|
||||||
|
|
||||||
discord
|
discord
|
||||||
|
|
|
@ -19,6 +19,6 @@
|
||||||
"editor.multiCursorLimit" = 700000;
|
"editor.multiCursorLimit" = 700000;
|
||||||
"elmLS.disableElmLSDiagnostics" = true;
|
"elmLS.disableElmLSDiagnostics" = true;
|
||||||
"elmLS.elmReviewDiagnostics" = "warning";
|
"elmLS.elmReviewDiagnostics" = "warning";
|
||||||
"editor.wordWrap" = true;
|
"editor.wordWrap" = "on";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
inherit (flake.config.services) instances;
|
inherit (flake.config.services) instances;
|
||||||
domain0 = instances.web.domains.url0;
|
domain0 = instances.web.domains.url0;
|
||||||
domain1 = instances.web.domains.url1;
|
domain1 = instances.web.domains.url1;
|
||||||
|
domain3 = instances.web.domains.url3;
|
||||||
dns = instances.web.dns.provider0;
|
dns = instances.web.dns.provider0;
|
||||||
instanceName = service: (instances.${service}.subdomain);
|
instanceName = service: (instances.${service}.subdomain);
|
||||||
dnsConfig = {
|
dnsConfig = {
|
||||||
|
@ -53,6 +54,7 @@ in {
|
||||||
[
|
[
|
||||||
domain0
|
domain0
|
||||||
domain1
|
domain1
|
||||||
|
domain3
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
28
nixos/modules/services/upRootNutrition.nix
Executable file
28
nixos/modules/services/upRootNutrition.nix
Executable 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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue