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:
parent
c49a6e7bd8
commit
a44510ee09
7 changed files with 53 additions and 2 deletions
33
hosts/thegeneralist-central/site.nix
Normal file
33
hosts/thegeneralist-central/site.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue