summary refs log tree commit diff
path: root/nixos/modules/services/security
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2019-05-18 09:36:24 +0000
committerGitHub <noreply@github.com>2019-05-18 09:36:24 +0000
commit6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6 (patch)
tree6590fc8630f685b81d4f1a5487a54b31785f3c8b /nixos/modules/services/security
parentd40443ba6de52faf08bb33198c6e501f46b85a89 (diff)
parent786f02f7a45621b9f628f63649ff92546aff83b7 (diff)
downloadnixpkgs-6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6.tar
nixpkgs-6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6.tar.gz
nixpkgs-6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6.tar.bz2
nixpkgs-6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6.tar.lz
nixpkgs-6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6.tar.xz
nixpkgs-6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6.tar.zst
nixpkgs-6cf583cf2f8d3cb89fa8a4d6edd86f4236862ea6.zip
Merge pull request #60406 from JohnAZoidberg/remove-isnull
treewide: Remove usage of isNull
Diffstat (limited to 'nixos/modules/services/security')
-rw-r--r--nixos/modules/services/security/oauth2_proxy.nix8
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 0c5fe8c0ef5..61f203ef9e7 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;