diff options
author | Daniel Schaefer <git@danielschaefer.me> | 2019-04-24 05:48:22 +0200 |
---|---|---|
committer | Daniel Schaefer <git@danielschaefer.me> | 2019-04-29 14:05:50 +0200 |
commit | 786f02f7a45621b9f628f63649ff92546aff83b7 (patch) | |
tree | 92784e131ccac4a1a63f7dbae6c228fb9d81468b /nixos/modules/services/security | |
parent | 5f14e83bd6b9ef1c83b035011267dd3d40278476 (diff) | |
download | nixlib-786f02f7a45621b9f628f63649ff92546aff83b7.tar nixlib-786f02f7a45621b9f628f63649ff92546aff83b7.tar.gz nixlib-786f02f7a45621b9f628f63649ff92546aff83b7.tar.bz2 nixlib-786f02f7a45621b9f628f63649ff92546aff83b7.tar.lz nixlib-786f02f7a45621b9f628f63649ff92546aff83b7.tar.xz nixlib-786f02f7a45621b9f628f63649ff92546aff83b7.tar.zst nixlib-786f02f7a45621b9f628f63649ff92546aff83b7.zip |
treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
Diffstat (limited to 'nixos/modules/services/security')
-rw-r--r-- | nixos/modules/services/security/oauth2_proxy.nix | 8 |
1 files changed, 4 insertions, 4 deletions
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; |