From 786f02f7a45621b9f628f63649ff92546aff83b7 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 24 Apr 2019 05:48:22 +0200 Subject: treewide: Remove usage of isNull isNull "is deprecated; just write e == null instead" says the Nix manual --- nixos/modules/services/security/oauth2_proxy.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nixos/modules/services/security') diff --git a/nixos/modules/services/security/oauth2_proxy.nix b/nixos/modules/services/security/oauth2_proxy.nix index 0c5fe8c0ef5f..61f203ef9e7d 100644 --- a/nixos/modules/services/security/oauth2_proxy.nix +++ b/nixos/modules/services/security/oauth2_proxy.nix @@ -58,11 +58,11 @@ let httponly = cookie.httpOnly; }; set-xauthrequest = setXauthrequest; - } // lib.optionalAttrs (!isNull cfg.email.addresses) { + } // lib.optionalAttrs (cfg.email.addresses != null) { authenticated-emails-file = authenticatedEmailsFile; } // lib.optionalAttrs (cfg.passBasicAuth) { basic-auth-password = cfg.basicAuthPassword; - } // lib.optionalAttrs (!isNull cfg.htpasswd.file) { + } // lib.optionalAttrs (cfg.htpasswd.file != null) { display-htpasswd-file = cfg.htpasswd.displayForm; } // lib.optionalAttrs tls.enable { tls-cert = tls.certificate; @@ -71,7 +71,7 @@ let } // (getProviderOptions cfg cfg.provider) // cfg.extraConfig; mapConfig = key: attr: - if (!isNull attr && attr != []) then ( + if attr != null && attr != [] then ( if isDerivation attr then mapConfig key (toString attr) else if (builtins.typeOf attr) == "set" then concatStringsSep " " (mapAttrsToList (name: value: mapConfig (key + "-" + name) value) attr) else @@ -538,7 +538,7 @@ in config = mkIf cfg.enable { - services.oauth2_proxy = mkIf (!isNull cfg.keyFile) { + services.oauth2_proxy = mkIf (cfg.keyFile != null) { clientID = mkDefault null; clientSecret = mkDefault null; cookie.secret = mkDefault null; -- cgit 1.4.1