From fdabea82472eec5f3b39fa01afcb775c7482996e Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Fri, 24 Jul 2026 15:19:52 +0800 Subject: [PATCH] treewide: drop redundant parentheses and eta-expand --- flake/hosts.nix | 14 ++++++-------- hosts/imxyy-nix-server/matrix.nix | 5 ++--- lib/umport.nix | 6 +++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/flake/hosts.nix b/flake/hosts.nix index 119fb9b..ce1a094 100644 --- a/flake/hosts.nix +++ b/flake/hosts.nix @@ -13,7 +13,7 @@ let nixpkgs = lib.mkMerge [ pkgsParams { - overlays = (import ./overlays args); + overlays = import ./overlays args; } ]; }; @@ -57,13 +57,11 @@ in modules = lib.mkOption { type = lib.types.listOf lib.types.deferredModule; - default = ( - lib.umport { - paths = [ ../hosts/${name} ]; - extraExcludePredicate = path: lib.hasInfix "/_" (toString path); - recursive = true; - } - ); + default = lib.umport { + paths = [ ../hosts/${name} ]; + extraExcludePredicate = path: lib.hasInfix "/_" (toString path); + recursive = true; + }; description = "Additional NixOS modules specific to this host"; }; diff --git a/hosts/imxyy-nix-server/matrix.nix b/hosts/imxyy-nix-server/matrix.nix index 59e91c6..f02d2a6 100644 --- a/hosts/imxyy-nix-server/matrix.nix +++ b/hosts/imxyy-nix-server/matrix.nix @@ -6,15 +6,14 @@ ... }: { - nixpkgs.config.permittedInsecurePackages = ( + nixpkgs.config.permittedInsecurePackages = lib.warn '' mautrix-telegram still using olm-3.2.16 '' [ "olm-3.2.16" - ] - ); + ]; sops.secrets.tuwunel-reg-token = { sopsFile = secrets.tuwunel-reg-token; restartUnits = [ "tuwunel.service" ]; diff --git a/lib/umport.nix b/lib/umport.nix index 54680c5..d98957c 100644 --- a/lib/umport.nix +++ b/lib/umport.nix @@ -19,8 +19,8 @@ let with lib; with fileset; let - excludedFiles = filter (path: pathIsRegularFile path) exclude; - excludedDirs = filter (path: pathIsDirectory path) exclude; + excludedFiles = filter pathIsRegularFile exclude; + excludedDirs = filter pathIsDirectory exclude; isExcluded = path: (elem path excludedFiles) @@ -39,7 +39,7 @@ let ) (builtins.readDir path) ) (unique (if path == null then paths else [ path ] ++ paths)) )) - ++ (if recursive then concatMap (path: toList path) (unique include) else unique include) + ++ (if recursive then concatMap toList (unique include) else unique include) ); in umport