setup if3 subdomain

This commit is contained in:
Adithya 2023-10-28 03:55:59 +05:30
parent 22dda9ea96
commit 8d79779032
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 32 additions and 5 deletions

View file

@ -1,12 +1,27 @@
{secrets, ...}: {
{
secrets,
if3,
...
}: {
services.caddy = {
enable = true;
inherit (secrets.caddy_config) email;
virtualHosts."proofs.adtya.xyz" = {
virtualHosts = {
"proofs.adtya.xyz" = {
extraConfig = ''
redir https://keyoxide.org/hkp/${secrets.users.primary.pgpFingerprint}
'';
};
"if3.adtya.xyz" = {
extraConfig = ''
root * ${if3.packages.web}/share/web
encode gzip
try_files {path} /index.html
file_server
'';
};
};
};
}

View file

@ -57,6 +57,18 @@ in {
custom_domains = "proofs.adtya.xyz";
local_port = 443;
};
"http.if3.adtya.xyz" = {
type = "http";
custom_domains = "if3.adtya.xyz";
local_port = 80;
};
"https.if3.adtya.xyz" = {
type = "https";
custom_domains = "if3.adtya.xyz";
local_port = 443;
};
};
};
}