Merge pull request #310350 from oddlama/fix-oauth2-proxy

nixos/oauth2-proxy: fix invalid comparison between list and attrset

authored by K900 and committed by GitHub 446ec6d9 969eb3b1

+3 -3
+3 -3
nixos/modules/services/security/oauth2-proxy-nginx.nix
··· 64 }; 65 }; 66 67 - config.services.oauth2-proxy = lib.mkIf (cfg.virtualHosts != [] && (lib.hasPrefix "127.0.0.1:" cfg.proxy)) { 68 enable = true; 69 }; 70 71 - config.services.nginx = lib.mkIf (cfg.virtualHosts != [] && config.services.oauth2-proxy.enable) (lib.mkMerge ([ 72 { 73 virtualHosts.${cfg.domain}.locations."/oauth2/" = { 74 proxyPass = cfg.proxy; ··· 78 ''; 79 }; 80 } 81 - ] ++ lib.optional (cfg.virtualHosts != []) { 82 recommendedProxySettings = true; # needed because duplicate headers 83 } ++ (lib.mapAttrsToList (vhost: conf: { 84 virtualHosts.${vhost} = {
··· 64 }; 65 }; 66 67 + config.services.oauth2-proxy = lib.mkIf (cfg.virtualHosts != {} && (lib.hasPrefix "127.0.0.1:" cfg.proxy)) { 68 enable = true; 69 }; 70 71 + config.services.nginx = lib.mkIf (cfg.virtualHosts != {} && config.services.oauth2-proxy.enable) (lib.mkMerge ([ 72 { 73 virtualHosts.${cfg.domain}.locations."/oauth2/" = { 74 proxyPass = cfg.proxy; ··· 78 ''; 79 }; 80 } 81 + ] ++ lib.optional (cfg.virtualHosts != {}) { 82 recommendedProxySettings = true; # needed because duplicate headers 83 } ++ (lib.mapAttrsToList (vhost: conf: { 84 virtualHosts.${vhost} = {