22
0
mirror of https://github.com/SuperSandro2000/nixos-modules.git synced 2024-06-11 02:34:05 +02:00

nginx: use with

This commit is contained in:
Sandro - 2024-01-02 16:48:31 +01:00
parent 38c5ee92ba
commit 587a687b8e
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -56,7 +56,7 @@ in
# source https://gist.github.com/danbst/f1e81358d5dd0ba9c763a950e91a25d0 # source https://gist.github.com/danbst/f1e81358d5dd0ba9c763a950e91a25d0
virtualHosts = lib.mkOption { virtualHosts = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule ({ config, ... }: let type = with lib.types; attrsOf (submodule ({ config, ... }: let
cfgv = config; cfgv = config;
in { in {
options = { options = {
@ -73,7 +73,7 @@ in
}; };
locations = lib.mkOption { locations = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule ({ config, ...}: { type = with lib.types; attrsOf (submodule ({ config, ...}: {
config.extraConfig = lib.optionalString cfg.setHSTSHeader /* nginx */ '' config.extraConfig = lib.optionalString cfg.setHSTSHeader /* nginx */ ''
more_set_headers "Strict-Transport-Security: max-age=63072000; includeSubDomains; preload"; more_set_headers "Strict-Transport-Security: max-age=63072000; includeSubDomains; preload";
'' + cfg.commonServerConfig + cfgv.commonLocationsConfig; '' + cfg.commonServerConfig + cfgv.commonLocationsConfig;