From e090d24809f42ecb4d3f50f7239352aaa1471321 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 09:30:31 +0200 Subject: [PATCH] nixos/thinkfan: lib.filterAttrs -> lib.removeAttrs --- nixos/modules/services/hardware/thinkfan.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix index d5d1f23f1d98..daf865252653 100644 --- a/nixos/modules/services/hardware/thinkfan.nix +++ b/nixos/modules/services/hardware/thinkfan.nix @@ -101,14 +101,12 @@ let # removes NixOS special and unused attributes sensorToConf = { type, query, ... }@args: - (lib.filterAttrs ( - k: v: - v != null - && !(lib.elem k [ + (lib.filterAttrs (k: v: v != null) ( + lib.removeAttrs args [ "type" "query" - ]) - ) args) + ] + )) // { "${type}" = query; };