configuration.nix/hosts/rico1/services/apps/adtya.xyz.nix

32 lines
784 B
Nix
Raw Normal View History

2024-07-03 17:03:34 +05:30
{ inputs, pkgs, ... }: {
services = {
caddy.virtualHosts."adtya.xyz" = {
serverAliases = [ "www.adtya.xyz" ];
extraConfig = ''
handle {
root * ${inputs.adtyaxyz.packages.${pkgs.system}.default}/share/web
encode gzip
try_files {path} /index.html
file_server
}
'';
};
frp.settings.proxies = [
{
name = "http.adtya.xyz";
type = "http";
customDomains = [ "adtya.xyz" "www.adtya.xyz" ];
localPort = 80;
transport.useCompression = true;
}
{
name = "https.adtya.xyz";
type = "https";
customDomains = [ "adtya.xyz" "www.adtya.xyz" ];
localPort = 443;
transport.useCompression = true;
}
];
};
}