1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-03-07 10:59:55 +01:00

site: finish setup

This commit is contained in:
TheGeneralist 2025-06-27 04:02:02 +02:00
parent c49a6e7bd8
commit a44510ee09
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
7 changed files with 53 additions and 2 deletions

View file

@ -0,0 +1,33 @@
{ config, pkgs, ... }: let
domain = "thegeneralist01.com";
in {
environment.systemPackages = [ pkgs.cloudflared ];
services.nginx = {
enable = true;
virtualHosts = {
"${domain}" = {
root = "/var/www/${domain}";
locations."/".tryFiles = "$uri $uri/ $uri/index.html";
};
};
};
age.secrets.cftcert.file = ./cert.pem.age;
age.secrets.cftcredentials.file = ./credentials.age;
services.cloudflared = {
enable = true;
certificateFile = config.age.secrets.cftcert.path;
tunnels."site" = {
ingress = {
"thegeneralist01.com" = "http://localhost:80";
"www.thegeneralist01.com" = "http://localhost:80";
};
default = "http_status:404";
credentialsFile = config.age.secrets.cftcredentials.path;
certificateFile = config.age.secrets.cftcert.path;
};
};
}