mirror of
https://github.com/RGBCube/Site
synced 2025-08-01 13:37:49 +00:00
Maybe fix ACME????????
This commit is contained in:
parent
f149577e62
commit
3d2c3e760d
1 changed files with 10 additions and 7 deletions
17
flake.nix
17
flake.nix
|
@ -147,6 +147,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
security.acme.certs.${cfg.url} = {
|
||||||
|
domain = "*.${cfg.url}";
|
||||||
|
group = "nginx";
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx = mkIf cfg.configureNginx {
|
services.nginx = mkIf cfg.configureNginx {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -156,15 +161,15 @@
|
||||||
recommendedTlsSettings = mkDefault true;
|
recommendedTlsSettings = mkDefault true;
|
||||||
|
|
||||||
virtualHosts.${cfg.url} = {
|
virtualHosts.${cfg.url} = {
|
||||||
enableACME = true;
|
forceSSL = true;
|
||||||
forceSSL = true;
|
useACMEHost = cfg.url;
|
||||||
|
|
||||||
locations."/".proxyPass = "http://localhost:${toString cfg.port}";
|
locations."/".proxyPass = "http://localhost:${toString cfg.port}";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts."www.${cfg.url}" = {
|
virtualHosts."www.${cfg.url}" = {
|
||||||
enableACME = true;
|
forceSSL = true;
|
||||||
forceSSL = true;
|
useACMEHost = cfg.url;
|
||||||
|
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
return 301 https://${cfg.url}$request_uri;
|
return 301 https://${cfg.url}$request_uri;
|
||||||
|
@ -173,7 +178,7 @@
|
||||||
|
|
||||||
virtualHosts._ = {
|
virtualHosts._ = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "*.${cfg.url}";
|
useACMEHost = cfg.url;
|
||||||
|
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
proxy_pass http://localhost:${toString cfg.port}/404;
|
proxy_pass http://localhost:${toString cfg.port}/404;
|
||||||
|
@ -185,8 +190,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme.certs."*.${cfg.url}" = {};
|
|
||||||
|
|
||||||
systemd.services.site = {
|
systemd.services.site = {
|
||||||
description = "RGBCube's Homepage";
|
description = "RGBCube's Homepage";
|
||||||
requires = [ "network.target" ];
|
requires = [ "network.target" ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue