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
1 changed files with 2 additions and 2 deletions

View File

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