diff options
author | Felix Buehler <account@buehler.rocks> | 2023-03-05 22:08:45 +0100 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-03-06 22:40:04 +0100 |
commit | d10e69c86bcd415f5c4347d3c6b981241e913465 (patch) | |
tree | 2ceccb33151ff07aa71680771ca6b6d549641164 /nixos/modules/hardware | |
parent | 794f34657e066a5e8cc4bb34491fee02240c6ac4 (diff) |
treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r-- | nixos/modules/hardware/device-tree.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix index 2807313a5a9c4..c568f52ab677d 100644 --- a/nixos/modules/hardware/device-tree.nix +++ b/nixos/modules/hardware/device-tree.nix @@ -65,7 +65,7 @@ let }; }; - filterDTBs = src: if isNull cfg.filter + filterDTBs = src: if cfg.filter == null then "${src}/dtbs" else pkgs.runCommand "dtbs-filtered" {} '' @@ -93,8 +93,8 @@ let # Fill in `dtboFile` for each overlay if not set already. # Existence of one of these is guarded by assertion below withDTBOs = xs: flip map xs (o: o // { dtboFile = - if isNull o.dtboFile then - if !isNull o.dtsFile then compileDTS o.name o.dtsFile + if o.dtboFile == null then + if o.dtsFile != null then compileDTS o.name o.dtsFile else compileDTS o.name (pkgs.writeText "dts" o.dtsText) else o.dtboFile; } ); @@ -181,7 +181,7 @@ in config = mkIf (cfg.enable) { assertions = let - invalidOverlay = o: isNull o.dtsFile && isNull o.dtsText && isNull o.dtboFile; + invalidOverlay = o: (o.dtsFile == null) && (o.dtsText == null) && (o.dtboFile == null); in lib.singleton { assertion = lib.all (o: !invalidOverlay o) cfg.overlays; message = '' |