mirror of
https://github.com/kp2pml30/dotfiles.git
synced 2026-02-17 07:44:41 +04:00
chore: update
This commit is contained in:
parent
8f90650888
commit
bbacfb100e
11 changed files with 198 additions and 65 deletions
|
|
@ -14,7 +14,7 @@ in lib.mkIf cfg.nginx {
|
|||
defaults.email = "kp2pml30@gmail.com";
|
||||
#defaults.server = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
||||
certs."${cfg.hostname}" = {
|
||||
extraDomainNames = [ "pr.${cfg.hostname}" "www.${cfg.hostname}" "git.${cfg.hostname}" "backend.${cfg.hostname}" ];
|
||||
extraDomainNames = [ "pr.${cfg.hostname}" "www.${cfg.hostname}" "git.${cfg.hostname}" "backend.${cfg.hostname}" "dns.${cfg.hostname}" "cache.nix.${cfg.hostname}" ];
|
||||
webroot = acmeRoot;
|
||||
group = "nginx";
|
||||
};
|
||||
|
|
@ -23,47 +23,74 @@ in lib.mkIf cfg.nginx {
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
virtualHosts."git.${cfg.hostname}" = {
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
virtualHosts = {
|
||||
"git.${cfg.hostname}" = {
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8002";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8002";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."backend.${cfg.hostname}" = {
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
"backend.${cfg.hostname}" = {
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8001";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8001";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."${cfg.hostname}" = {
|
||||
# addSSL = true;
|
||||
# forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
"dns.${cfg.hostname}" = {
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
|
||||
locations."/" = {
|
||||
root = cfg.sitePath;
|
||||
tryFiles = "$uri $uri/ /index.html";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8003";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
"${cfg.hostname}" = {
|
||||
# addSSL = true;
|
||||
# forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
|
||||
locations."/" = {
|
||||
root = cfg.sitePath;
|
||||
tryFiles = "$uri $uri/ /index.html";
|
||||
};
|
||||
};
|
||||
} // (if cfg.nix-cache then {
|
||||
"cache.nix.${cfg.hostname}" = {
|
||||
enableACME = true;
|
||||
acmeRoot = acmeRoot;
|
||||
listen = [
|
||||
{ addr = "0.0.0.0"; port = 80; }
|
||||
];
|
||||
locations."/" = {
|
||||
proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
||||
};
|
||||
};
|
||||
} else {});
|
||||
|
||||
streamConfig = (builtins.readFile ./stream.nginx);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue