1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-27 18:17:44 +00:00

chore: migrate cube host

This commit is contained in:
RGBCube 2025-02-23 14:26:08 +03:00
parent dad68acf68
commit f2ab446c48
45 changed files with 904 additions and 88 deletions

View file

@ -2,13 +2,13 @@
inherit (config.networking) domain;
inherit (lib) enabled mkConst;
in {
options.nginxSslTemplate = mkConst {
options.nginx.sslTemplate = mkConst {
forceSSL = true;
quic = true;
useACMEHost = config.networking.domain;
};
options.nginxHeaders = mkConst ''
options.nginx.headers = mkConst ''
# TODO: Not working for some reason.
add_header Access-Control-Allow-Origin $allow_origin;
add_header Access-Control-Allow-Methods $allow_methods;
@ -33,7 +33,7 @@ in {
listenAddress = "[::]";
};
config.acmeUsers = [ "nginx" ];
config.security.acme.users = [ "nginx" ];
config.services.nginx = enabled {
package = pkgs.nginxQuic;
@ -61,7 +61,7 @@ in {
~^https://.+\.${domain}$ "GET, HEAD, OPTIONS";
}
${config.nginxHeaders}
${config.nginx.headers}
proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
'';