This commit is contained in:
Hadi 2024-06-19 23:07:47 +02:00
parent 9dbc87c010
commit e51b20e4ab
3 changed files with 23 additions and 10 deletions

View File

@ -3,7 +3,12 @@
services.cloudflare-dyndns = {
enable = true;
ipv4 = true;
domains = [ "cloud.anotherhadi.com" "vault.anotherhadi.com" "try.anotherhadi.com"];
domains = [
"cloud.anotherhadi.com"
"vault.anotherhadi.com"
"anotherhadi.com"
"www.anotherhadi.com"
];
proxied = true;
apiTokenFile = "/etc/cloudflare/apiToken";
};

View File

@ -1,9 +1,16 @@
# Nginx Reverse Proxy & ACME certs
{config, ...}:{
{ config, ... }: {
services.nginx.enable = true;
security.acme = {
acceptTerms = true;
defaults.email = ${config.var.git.email};
defaults.email = config.var.git.email;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
# test
services.nginx.virtualHosts."anotherhadi.com" = {
forceSSL = true;
enableACME = true;
locations."/".root = "/var/www/";
};
}

View File

@ -6,6 +6,7 @@
../modules/server/openssh.nix
../modules/server/sops.nix
../modules/server/cloudflare-dyndns.nix
../modules/server/nginx.nix
];
# Bootloader.