Unverified Commit 58286e51 authored by oddlama's avatar oddlama
Browse files

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

parent f1010e04
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -64,11 +64,11 @@ in
    };
  };

  config.services.oauth2-proxy = lib.mkIf (cfg.virtualHosts != [] && (lib.hasPrefix "127.0.0.1:" cfg.proxy)) {
  config.services.oauth2-proxy = lib.mkIf (cfg.virtualHosts != {} && (lib.hasPrefix "127.0.0.1:" cfg.proxy)) {
    enable = true;
  };

  config.services.nginx = lib.mkIf (cfg.virtualHosts != [] && config.services.oauth2-proxy.enable) (lib.mkMerge ([
  config.services.nginx = lib.mkIf (cfg.virtualHosts != {} && config.services.oauth2-proxy.enable) (lib.mkMerge ([
    {
      virtualHosts.${cfg.domain}.locations."/oauth2/" = {
        proxyPass = cfg.proxy;
@@ -78,7 +78,7 @@ in
        '';
      };
    }
  ] ++ lib.optional (cfg.virtualHosts != []) {
  ] ++ lib.optional (cfg.virtualHosts != {}) {
    recommendedProxySettings = true; # needed because duplicate headers
  } ++ (lib.mapAttrsToList (vhost: conf: {
    virtualHosts.${vhost} = {